diff options
author | jsing <> | 2018-03-17 14:57:23 +0000 |
---|---|---|
committer | jsing <> | 2018-03-17 14:57:23 +0000 |
commit | 27effbf9623928426d7ac8c71d3f01f9f3071f9b (patch) | |
tree | 1590c5d8f6a75d044a0c9832b6860e37aa75f0dd /src | |
parent | 53236ab726f2cb84436bc0cc39769e610cad136d (diff) | |
download | openbsd-27effbf9623928426d7ac8c71d3f01f9f3071f9b.tar.gz openbsd-27effbf9623928426d7ac8c71d3f01f9f3071f9b.tar.bz2 openbsd-27effbf9623928426d7ac8c71d3f01f9f3071f9b.zip |
Fix X509_get0_pubkey() - X509_get_pubkey() is a misnamed "get1" function,
so call X509_PUBKEY_get0() instead.
Spotted by schwarze@ while documenting.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_cmp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_cmp.c b/src/lib/libcrypto/x509/x509_cmp.c index 001f98e61a..ab0dbcba39 100644 --- a/src/lib/libcrypto/x509/x509_cmp.c +++ b/src/lib/libcrypto/x509/x509_cmp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_cmp.c,v 1.29 2018/02/22 17:22:02 jsing Exp $ */ | 1 | /* $OpenBSD: x509_cmp.c,v 1.30 2018/03/17 14:57:23 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -329,7 +329,9 @@ X509_get_pubkey(X509 *x) | |||
329 | EVP_PKEY * | 329 | EVP_PKEY * |
330 | X509_get0_pubkey(X509 *x) | 330 | X509_get0_pubkey(X509 *x) |
331 | { | 331 | { |
332 | return X509_get_pubkey(x); | 332 | if (x == NULL || x->cert_info == NULL) |
333 | return (NULL); | ||
334 | return (X509_PUBKEY_get0(x->cert_info->key)); | ||
333 | } | 335 | } |
334 | 336 | ||
335 | ASN1_BIT_STRING * | 337 | ASN1_BIT_STRING * |