diff options
| author | tb <> | 2021-11-01 20:53:08 +0000 |
|---|---|---|
| committer | tb <> | 2021-11-01 20:53:08 +0000 |
| commit | b1d784eb6c4f1df06e96cfc40e2434cf76165cbe (patch) | |
| tree | cbf2de4e6ef2a9e9d9281e6e60c30149cd648fd1 /src/lib/libcrypto/ocsp | |
| parent | 95589e2e9b8cb0aa7ceb0bdf1ad9af358f6564db (diff) | |
| download | openbsd-b1d784eb6c4f1df06e96cfc40e2434cf76165cbe.tar.gz openbsd-b1d784eb6c4f1df06e96cfc40e2434cf76165cbe.tar.bz2 openbsd-b1d784eb6c4f1df06e96cfc40e2434cf76165cbe.zip | |
Move the now internal X.509-related structs into x509_lcl.h.
Garbage collect the now unused LIBRESSL_CRYPTO_INTERNAL and
LIBRESSL_OPAQUE_X509. Include "x509_lcl.h" where needed and
fix a couple of unnecessary reacharounds.
ok jsing
Diffstat (limited to 'src/lib/libcrypto/ocsp')
| -rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_cl.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_ext.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_srv.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/ocsp/ocsp_vfy.c | 4 |
4 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/libcrypto/ocsp/ocsp_cl.c b/src/lib/libcrypto/ocsp/ocsp_cl.c index 677a1b35dd..da4b5ad04c 100644 --- a/src/lib/libcrypto/ocsp/ocsp_cl.c +++ b/src/lib/libcrypto/ocsp/ocsp_cl.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ocsp_cl.c,v 1.18 2021/10/24 13:50:14 tb Exp $ */ | 1 | /* $OpenBSD: ocsp_cl.c,v 1.19 2021/11/01 20:53:08 tb Exp $ */ |
| 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL | 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL |
| 3 | * project. */ | 3 | * project. */ |
| 4 | 4 | ||
| @@ -136,7 +136,7 @@ OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert) | |||
| 136 | 136 | ||
| 137 | if (!sk_X509_push(sig->certs, cert)) | 137 | if (!sk_X509_push(sig->certs, cert)) |
| 138 | return 0; | 138 | return 0; |
| 139 | CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509); | 139 | X509_up_ref(cert); |
| 140 | return 1; | 140 | return 1; |
| 141 | } | 141 | } |
| 142 | 142 | ||
diff --git a/src/lib/libcrypto/ocsp/ocsp_ext.c b/src/lib/libcrypto/ocsp/ocsp_ext.c index eb51cfbff5..c48843492d 100644 --- a/src/lib/libcrypto/ocsp/ocsp_ext.c +++ b/src/lib/libcrypto/ocsp/ocsp_ext.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ocsp_ext.c,v 1.18 2018/05/14 23:47:10 tb Exp $ */ | 1 | /* $OpenBSD: ocsp_ext.c,v 1.19 2021/11/01 20:53:08 tb Exp $ */ |
| 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL | 2 | /* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL |
| 3 | * project. */ | 3 | * project. */ |
| 4 | 4 | ||
| @@ -70,6 +70,8 @@ | |||
| 70 | #include <openssl/x509.h> | 70 | #include <openssl/x509.h> |
| 71 | #include <openssl/x509v3.h> | 71 | #include <openssl/x509v3.h> |
| 72 | 72 | ||
| 73 | #include "x509_lcl.h" | ||
| 74 | |||
| 73 | /* Standard wrapper functions for extensions */ | 75 | /* Standard wrapper functions for extensions */ |
| 74 | 76 | ||
| 75 | /* OCSP request extensions */ | 77 | /* OCSP request extensions */ |
diff --git a/src/lib/libcrypto/ocsp/ocsp_srv.c b/src/lib/libcrypto/ocsp/ocsp_srv.c index a9e0aaab2f..5c9ac4d807 100644 --- a/src/lib/libcrypto/ocsp/ocsp_srv.c +++ b/src/lib/libcrypto/ocsp/ocsp_srv.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ocsp_srv.c,v 1.10 2017/01/29 17:49:23 beck Exp $ */ | 1 | /* $OpenBSD: ocsp_srv.c,v 1.11 2021/11/01 20:53:08 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2001. | 3 | * project 2001. |
| 4 | */ | 4 | */ |
| @@ -213,7 +213,7 @@ OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert) | |||
| 213 | 213 | ||
| 214 | if (!sk_X509_push(resp->certs, cert)) | 214 | if (!sk_X509_push(resp->certs, cert)) |
| 215 | return 0; | 215 | return 0; |
| 216 | CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509); | 216 | X509_up_ref(cert); |
| 217 | return 1; | 217 | return 1; |
| 218 | } | 218 | } |
| 219 | 219 | ||
diff --git a/src/lib/libcrypto/ocsp/ocsp_vfy.c b/src/lib/libcrypto/ocsp/ocsp_vfy.c index e92b5d7326..67d45605ff 100644 --- a/src/lib/libcrypto/ocsp/ocsp_vfy.c +++ b/src/lib/libcrypto/ocsp/ocsp_vfy.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ocsp_vfy.c,v 1.16 2021/10/24 13:50:14 tb Exp $ */ | 1 | /* $OpenBSD: ocsp_vfy.c,v 1.17 2021/11/01 20:53:08 tb Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -60,6 +60,8 @@ | |||
| 60 | #include <openssl/err.h> | 60 | #include <openssl/err.h> |
| 61 | #include <string.h> | 61 | #include <string.h> |
| 62 | 62 | ||
| 63 | #include "x509_lcl.h" | ||
| 64 | |||
| 63 | static int ocsp_find_signer(X509 **psigner, OCSP_BASICRESP *bs, | 65 | static int ocsp_find_signer(X509 **psigner, OCSP_BASICRESP *bs, |
| 64 | STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags); | 66 | STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags); |
| 65 | static X509 *ocsp_find_signer_sk(STACK_OF(X509) *certs, OCSP_RESPID *id); | 67 | static X509 *ocsp_find_signer_sk(STACK_OF(X509) *certs, OCSP_RESPID *id); |
