summaryrefslogtreecommitdiffstats
path: root/crypto/pem/pvkfmt.c
diff options
context:
space:
mode:
authorChristian Hohnstaedt <christian@hohnstaedt.de>2020-03-22 09:41:30 +0100
committerTomas Mraz <tmraz@fedoraproject.org>2020-04-27 17:43:19 +0200
commit80b94a5adb461f94629d36db351a051b0a890856 (patch)
treec70b5ef1e38c7a2a1900e06f191c0eddc8333c2e /crypto/pem/pvkfmt.c
parent7ffce852372799b6cd856b711db21332f0048314 (diff)
i2b_PVK_bio: don't set PEM_R_BIO_WRITE_FAILURE in case of success
but in case of an error CLA: trivial Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> (Merged from https://github.com/openssl/openssl/pull/11380)
Diffstat (limited to 'crypto/pem/pvkfmt.c')
-rw-r--r--crypto/pem/pvkfmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c
index 6896cc4e4c..1a24ce755a 100644
--- a/crypto/pem/pvkfmt.c
+++ b/crypto/pem/pvkfmt.c
@@ -882,9 +882,9 @@ int i2b_PVK_bio(BIO *out, const EVP_PKEY *pk, int enclevel,
wrlen = BIO_write(out, tmp, outlen);
OPENSSL_free(tmp);
if (wrlen == outlen) {
- PEMerr(PEM_F_I2B_PVK_BIO, PEM_R_BIO_WRITE_FAILURE);
return outlen;
}
+ PEMerr(PEM_F_I2B_PVK_BIO, PEM_R_BIO_WRITE_FAILURE);
return -1;
}