summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPW Hu <jlu.hpw@foxmail.com>2021-11-05 17:16:03 +0800
committerPauli <pauli@openssl.org>2021-11-09 10:05:09 +1000
commit09235289c377ff998964bb6b074bb2a3ad768fd2 (patch)
tree54e2b83fc0e85f8144cce948b1c3dbb572e3c9a7
parentff3e4508bde0d7f7ab211ca9f027bef820ba1d70 (diff)
Fix: invoking x509_name_cannon improperly
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16974)
-rw-r--r--crypto/x509/x_name.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c
index d5ef8e3408..bed2d049b4 100644
--- a/crypto/x509/x_name.c
+++ b/crypto/x509/x_name.c
@@ -219,8 +219,8 @@ static int x509_name_ex_i2d(const ASN1_VALUE **val, unsigned char **out,
if (ret < 0)
return ret;
ret = x509_name_canon(a);
- if (ret < 0)
- return ret;
+ if (!ret)
+ return -1;
}
ret = a->bytes->length;
if (out != NULL) {