diff options
author | tb <> | 2021-10-21 13:02:01 +0000 |
---|---|---|
committer | tb <> | 2021-10-21 13:02:01 +0000 |
commit | 8c7aab3491f9d8d5936ec5ee93e3ddc0efb458cb (patch) | |
tree | 25a577afbd849c7c11bf24241591ca8c98b2709d /src/lib | |
parent | e1ae1d6d7815675130a733b91dcdabbd686dbf6f (diff) | |
download | openbsd-8c7aab3491f9d8d5936ec5ee93e3ddc0efb458cb.tar.gz openbsd-8c7aab3491f9d8d5936ec5ee93e3ddc0efb458cb.tar.bz2 openbsd-8c7aab3491f9d8d5936ec5ee93e3ddc0efb458cb.zip |
Prepare to provide X509_get_X509_PUBKEY() as a function.
ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509_set.c | 10 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 5b25c6e4b1..a3d17a426b 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.76 2021/09/02 12:41:44 job Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.77 2021/10/21 13:02:00 tb 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 | * |
@@ -621,9 +621,11 @@ void X509_CRL_METHOD_free(X509_CRL_METHOD *m); | |||
621 | void X509_CRL_set_meth_data(X509_CRL *crl, void *dat); | 621 | void X509_CRL_set_meth_data(X509_CRL *crl, void *dat); |
622 | void *X509_CRL_get_meth_data(X509_CRL *crl); | 622 | void *X509_CRL_get_meth_data(X509_CRL *crl); |
623 | 623 | ||
624 | /* This one is only used so that a binary form can output, as in | 624 | #if defined(LIBRESSL_NEW_API) |
625 | * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf) */ | 625 | X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x); |
626 | #define X509_get_X509_PUBKEY(x) ((x)->cert_info->key) | 626 | #else |
627 | #define X509_get_X509_PUBKEY(x) (x)->cert_info->key | ||
628 | #endif | ||
627 | 629 | ||
628 | 630 | ||
629 | const char *X509_verify_cert_error_string(long n); | 631 | const char *X509_verify_cert_error_string(long n); |
diff --git a/src/lib/libcrypto/x509/x509_set.c b/src/lib/libcrypto/x509/x509_set.c index 1a4b583ab7..e086c021cd 100644 --- a/src/lib/libcrypto/x509/x509_set.c +++ b/src/lib/libcrypto/x509/x509_set.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_set.c,v 1.17 2018/08/24 19:55:58 tb Exp $ */ | 1 | /* $OpenBSD: x509_set.c,v 1.18 2021/10/21 13:02:01 tb 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 | * |
@@ -216,3 +216,11 @@ X509_get_signature_type(const X509 *x) | |||
216 | { | 216 | { |
217 | return EVP_PKEY_type(OBJ_obj2nid(x->sig_alg->algorithm)); | 217 | return EVP_PKEY_type(OBJ_obj2nid(x->sig_alg->algorithm)); |
218 | } | 218 | } |
219 | |||
220 | #if defined(LIBRESSL_NEW_API) | ||
221 | X509_PUBKEY * | ||
222 | X509_get_X509_PUBKEY(const X509 *x) | ||
223 | { | ||
224 | return x->cert_info->key; | ||
225 | } | ||
226 | #endif | ||