summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ocsp
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2021-11-01 20:53:09 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2021-11-01 20:53:09 +0000
commit4826bb143de0d29c57e632181b3770ecc6e302ba (patch)
tree572ac3adfa0b088284a27ecdf7de18447092c183 /lib/libcrypto/ocsp
parentdfb8774a73a47b76cbd387eea5780f68c84008c6 (diff)
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 'lib/libcrypto/ocsp')
-rw-r--r--lib/libcrypto/ocsp/ocsp_cl.c4
-rw-r--r--lib/libcrypto/ocsp/ocsp_ext.c4
-rw-r--r--lib/libcrypto/ocsp/ocsp_srv.c4
-rw-r--r--lib/libcrypto/ocsp/ocsp_vfy.c4
4 files changed, 10 insertions, 6 deletions
diff --git a/lib/libcrypto/ocsp/ocsp_cl.c b/lib/libcrypto/ocsp/ocsp_cl.c
index 677a1b35ddd..da4b5ad04c1 100644
--- a/lib/libcrypto/ocsp/ocsp_cl.c
+++ b/lib/libcrypto/ocsp/ocsp_cl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp_cl.c,v 1.18 2021/10/24 13:50:14 tb Exp $ */
+/* $OpenBSD: ocsp_cl.c,v 1.19 2021/11/01 20:53:08 tb Exp $ */
/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
* project. */
@@ -136,7 +136,7 @@ OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert)
if (!sk_X509_push(sig->certs, cert))
return 0;
- CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
+ X509_up_ref(cert);
return 1;
}
diff --git a/lib/libcrypto/ocsp/ocsp_ext.c b/lib/libcrypto/ocsp/ocsp_ext.c
index eb51cfbff5a..c48843492dc 100644
--- a/lib/libcrypto/ocsp/ocsp_ext.c
+++ b/lib/libcrypto/ocsp/ocsp_ext.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp_ext.c,v 1.18 2018/05/14 23:47:10 tb Exp $ */
+/* $OpenBSD: ocsp_ext.c,v 1.19 2021/11/01 20:53:08 tb Exp $ */
/* Written by Tom Titchener <Tom_Titchener@groove.net> for the OpenSSL
* project. */
@@ -70,6 +70,8 @@
#include <openssl/x509.h>
#include <openssl/x509v3.h>
+#include "x509_lcl.h"
+
/* Standard wrapper functions for extensions */
/* OCSP request extensions */
diff --git a/lib/libcrypto/ocsp/ocsp_srv.c b/lib/libcrypto/ocsp/ocsp_srv.c
index a9e0aaab2f1..5c9ac4d807e 100644
--- a/lib/libcrypto/ocsp/ocsp_srv.c
+++ b/lib/libcrypto/ocsp/ocsp_srv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp_srv.c,v 1.10 2017/01/29 17:49:23 beck Exp $ */
+/* $OpenBSD: ocsp_srv.c,v 1.11 2021/11/01 20:53:08 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2001.
*/
@@ -213,7 +213,7 @@ OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert)
if (!sk_X509_push(resp->certs, cert))
return 0;
- CRYPTO_add(&cert->references, 1, CRYPTO_LOCK_X509);
+ X509_up_ref(cert);
return 1;
}
diff --git a/lib/libcrypto/ocsp/ocsp_vfy.c b/lib/libcrypto/ocsp/ocsp_vfy.c
index e92b5d73262..67d45605ffe 100644
--- a/lib/libcrypto/ocsp/ocsp_vfy.c
+++ b/lib/libcrypto/ocsp/ocsp_vfy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ocsp_vfy.c,v 1.16 2021/10/24 13:50:14 tb Exp $ */
+/* $OpenBSD: ocsp_vfy.c,v 1.17 2021/11/01 20:53:08 tb Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -60,6 +60,8 @@
#include <openssl/err.h>
#include <string.h>
+#include "x509_lcl.h"
+
static int ocsp_find_signer(X509 **psigner, OCSP_BASICRESP *bs,
STACK_OF(X509) *certs, X509_STORE *st, unsigned long flags);
static X509 *ocsp_find_signer_sk(STACK_OF(X509) *certs, OCSP_RESPID *id);