summaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
authorPW Hu <jlu.hpw@foxmail.com>2021-11-10 05:39:54 +0100
committerTomas Mraz <tomas@openssl.org>2021-11-22 11:17:48 +0100
commit2349d7ba57c9327290df6f7bc18b7f0c3976ca9e (patch)
tree665b40724ec43bd912f90de936e06e4c890f9bdd /crypto/dh
parentd2i_PublicKey: Make it work with EC parameters in a provided key (diff)
downloadopenssl-2349d7ba57c9327290df6f7bc18b7f0c3976ca9e.tar.xz
openssl-2349d7ba57c9327290df6f7bc18b7f0c3976ca9e.zip
Fix the return check of OBJ_obj2txt
Also update OBJ_nid2obj.pod to document the possible return values. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17005)
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh_kdf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dh/dh_kdf.c b/crypto/dh/dh_kdf.c
index 7a234b8fb1..419e7711d3 100644
--- a/crypto/dh/dh_kdf.c
+++ b/crypto/dh/dh_kdf.c
@@ -70,7 +70,7 @@ int DH_KDF_X9_42(unsigned char *out, size_t outlen,
const OSSL_PROVIDER *prov = EVP_MD_get0_provider(md);
OSSL_LIB_CTX *libctx = ossl_provider_libctx(prov);
- if (!OBJ_obj2txt(key_alg, sizeof(key_alg), key_oid, 0))
+ if (OBJ_obj2txt(key_alg, sizeof(key_alg), key_oid, 0) <= 0)
return 0;
return ossl_dh_kdf_X9_42_asn1(out, outlen, Z, Zlen, key_alg,