summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2021-11-01 08:14:36 +0000
committertb <>2021-11-01 08:14:36 +0000
commit9e4ccc5228dcbfa0dfefbcb77f4fbc4409e63949 (patch)
tree09eaa986df5bec5fc37f0dad91370c7d06c3f62e /src/lib
parent24b324d6b70a17a56bae163dd5417bf00331ec48 (diff)
downloadopenbsd-9e4ccc5228dcbfa0dfefbcb77f4fbc4409e63949.tar.gz
openbsd-9e4ccc5228dcbfa0dfefbcb77f4fbc4409e63949.tar.bz2
openbsd-9e4ccc5228dcbfa0dfefbcb77f4fbc4409e63949.zip
Unifdef LIBRESSL_NEW_API. Now that the library is bumped, this is
no longer needed. ok jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/asn1/asn1.h4
-rw-r--r--src/lib/libcrypto/bio/bio.h4
-rw-r--r--src/lib/libcrypto/crypto.h4
-rw-r--r--src/lib/libcrypto/evp/evp.h4
-rw-r--r--src/lib/libcrypto/ocsp/ocsp.h6
-rw-r--r--src/lib/libcrypto/opensslfeatures.h1
-rw-r--r--src/lib/libcrypto/x509/x509.h15
-rw-r--r--src/lib/libcrypto/x509/x509_set.c4
-rw-r--r--src/lib/libcrypto/x509/x509_vfy.h18
-rw-r--r--src/lib/libcrypto/x509/x509v3.h4
-rw-r--r--src/lib/libssl/ssl.h6
11 files changed, 10 insertions, 60 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h
index 43b038adaa..815256a30d 100644
--- a/src/lib/libcrypto/asn1/asn1.h
+++ b/src/lib/libcrypto/asn1/asn1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1.h,v 1.55 2021/10/27 09:50:57 beck Exp $ */ 1/* $OpenBSD: asn1.h,v 1.56 2021/11/01 08:14:36 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 *
@@ -773,10 +773,8 @@ ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len);
773int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **out); 773int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **out);
774extern const ASN1_ITEM ASN1_TIME_it; 774extern const ASN1_ITEM ASN1_TIME_it;
775 775
776#if defined(LIBRESSL_NEW_API)
777int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, 776int ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from,
778 const ASN1_TIME *to); 777 const ASN1_TIME *to);
779#endif
780 778
781extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it; 779extern const ASN1_ITEM ASN1_OCTET_STRING_NDEF_it;
782 780
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h
index 735d16e6b9..78949f051e 100644
--- a/src/lib/libcrypto/bio/bio.h
+++ b/src/lib/libcrypto/bio/bio.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bio.h,v 1.46 2021/10/24 13:46:56 tb Exp $ */ 1/* $OpenBSD: bio.h,v 1.47 2021/11/01 08:14:36 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 *
@@ -607,9 +607,7 @@ int BIO_free(BIO *a);
607int BIO_up_ref(BIO *bio); 607int BIO_up_ref(BIO *bio);
608void *BIO_get_data(BIO *a); 608void *BIO_get_data(BIO *a);
609void BIO_set_data(BIO *a, void *ptr); 609void BIO_set_data(BIO *a, void *ptr);
610#if defined(LIBRESSL_NEW_API)
611int BIO_get_init(BIO *a); 610int BIO_get_init(BIO *a);
612#endif
613void BIO_set_init(BIO *a, int init); 611void BIO_set_init(BIO *a, int init);
614int BIO_get_shutdown(BIO *a); 612int BIO_get_shutdown(BIO *a);
615void BIO_set_shutdown(BIO *a, int shut); 613void BIO_set_shutdown(BIO *a, int shut);
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index aba5556029..ea475e3bf4 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.51 2021/10/23 09:13:51 beck Exp $ */ 1/* $OpenBSD: crypto.h,v 1.52 2021/11/01 08:14:36 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -505,10 +505,8 @@ uint64_t OPENSSL_cpu_caps(void);
505int OPENSSL_isservice(void); 505int OPENSSL_isservice(void);
506 506
507#ifndef LIBRESSL_INTERNAL 507#ifndef LIBRESSL_INTERNAL
508#if defined(LIBRESSL_NEW_API)
509int FIPS_mode(void); 508int FIPS_mode(void);
510int FIPS_mode_set(int r); 509int FIPS_mode_set(int r);
511#endif
512 510
513void OPENSSL_init(void); 511void OPENSSL_init(void);
514 512
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 4e32a794b4..3af94350f7 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp.h,v 1.84 2021/10/24 13:51:07 tb Exp $ */ 1/* $OpenBSD: evp.h,v 1.85 2021/11/01 08:14:36 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 *
@@ -486,9 +486,7 @@ int EVP_MD_block_size(const EVP_MD *md);
486unsigned long EVP_MD_flags(const EVP_MD *md); 486unsigned long EVP_MD_flags(const EVP_MD *md);
487 487
488const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); 488const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
489#if defined(LIBRESSL_NEW_API)
490void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); 489void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
491#endif
492#define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) 490#define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e))
493#define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) 491#define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e))
494#define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) 492#define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e))
diff --git a/src/lib/libcrypto/ocsp/ocsp.h b/src/lib/libcrypto/ocsp/ocsp.h
index 554d164601..f942a8a0eb 100644
--- a/src/lib/libcrypto/ocsp/ocsp.h
+++ b/src/lib/libcrypto/ocsp/ocsp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocsp.h,v 1.17 2021/10/24 13:50:14 tb Exp $ */ 1/* $OpenBSD: ocsp.h,v 1.18 2021/11/01 08:14:36 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
@@ -414,22 +414,18 @@ int OCSP_request_sign(OCSP_REQUEST *req, X509 *signer, EVP_PKEY *key,
414int OCSP_response_status(OCSP_RESPONSE *resp); 414int OCSP_response_status(OCSP_RESPONSE *resp);
415OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp); 415OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
416 416
417#if defined(LIBRESSL_NEW_API)
418const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs); 417const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs);
419const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs); 418const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs);
420const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs); 419const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs);
421int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer, 420int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer,
422 STACK_OF(X509) *extra_certs); 421 STACK_OF(X509) *extra_certs);
423#endif
424 422
425int OCSP_resp_count(OCSP_BASICRESP *bs); 423int OCSP_resp_count(OCSP_BASICRESP *bs);
426OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx); 424OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
427#if defined(LIBRESSL_NEW_API)
428const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP *bs); 425const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP *bs);
429const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs); 426const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
430int OCSP_resp_get0_id(const OCSP_BASICRESP *bs, 427int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
431 const ASN1_OCTET_STRING **pid, const X509_NAME **pname); 428 const ASN1_OCTET_STRING **pid, const X509_NAME **pname);
432#endif
433 429
434int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last); 430int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
435int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, 431int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
diff --git a/src/lib/libcrypto/opensslfeatures.h b/src/lib/libcrypto/opensslfeatures.h
index 4b157a6e63..f16e25e782 100644
--- a/src/lib/libcrypto/opensslfeatures.h
+++ b/src/lib/libcrypto/opensslfeatures.h
@@ -6,7 +6,6 @@
6#define LIBRESSL_HAS_TLS1_3 6#define LIBRESSL_HAS_TLS1_3
7#define LIBRESSL_HAS_DTLS1_2 7#define LIBRESSL_HAS_DTLS1_2
8 8
9#define LIBRESSL_NEW_API
10#define LIBRESSL_OPAQUE_X509 9#define LIBRESSL_OPAQUE_X509
11 10
12#define OPENSSL_THREADS 11#define OPENSSL_THREADS
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h
index 43b2307c8f..9a44bf30aa 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.85 2021/10/31 16:51:16 tb Exp $ */ 1/* $OpenBSD: x509.h,v 1.86 2021/11/01 08:14:36 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 *
@@ -594,9 +594,7 @@ extern "C" {
594int X509_CRL_up_ref(X509_CRL *x); 594int X509_CRL_up_ref(X509_CRL *x);
595int X509_CRL_get_signature_nid(const X509_CRL *crl); 595int X509_CRL_get_signature_nid(const X509_CRL *crl);
596 596
597#if defined(LIBRESSL_NEW_API)
598int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp); 597int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp);
599#endif
600 598
601const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl); 599const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl);
602long X509_CRL_get_version(const X509_CRL *crl); 600long X509_CRL_get_version(const X509_CRL *crl);
@@ -626,12 +624,7 @@ void X509_CRL_METHOD_free(X509_CRL_METHOD *m);
626void X509_CRL_set_meth_data(X509_CRL *crl, void *dat); 624void X509_CRL_set_meth_data(X509_CRL *crl, void *dat);
627void *X509_CRL_get_meth_data(X509_CRL *crl); 625void *X509_CRL_get_meth_data(X509_CRL *crl);
628 626
629#if defined(LIBRESSL_NEW_API)
630X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x); 627X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x);
631#else
632#define X509_get_X509_PUBKEY(x) (x)->cert_info->key
633#endif
634
635 628
636const char *X509_verify_cert_error_string(long n); 629const char *X509_verify_cert_error_string(long n);
637 630
@@ -831,12 +824,10 @@ void X509_SIG_free(X509_SIG *a);
831X509_SIG *d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len); 824X509_SIG *d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len);
832int i2d_X509_SIG(X509_SIG *a, unsigned char **out); 825int i2d_X509_SIG(X509_SIG *a, unsigned char **out);
833extern const ASN1_ITEM X509_SIG_it; 826extern const ASN1_ITEM X509_SIG_it;
834#if defined(LIBRESSL_NEW_API)
835void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg, 827void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg,
836 const ASN1_OCTET_STRING **pdigest); 828 const ASN1_OCTET_STRING **pdigest);
837void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, 829void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg,
838 ASN1_OCTET_STRING **pdigest); 830 ASN1_OCTET_STRING **pdigest);
839#endif
840 831
841X509_REQ_INFO *X509_REQ_INFO_new(void); 832X509_REQ_INFO *X509_REQ_INFO_new(void);
842void X509_REQ_INFO_free(X509_REQ_INFO *a); 833void X509_REQ_INFO_free(X509_REQ_INFO *a);
@@ -903,9 +894,7 @@ void *X509_get_ex_data(X509 *r, int idx);
903int i2d_X509_AUX(X509 *a,unsigned char **pp); 894int i2d_X509_AUX(X509 *a,unsigned char **pp);
904X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); 895X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length);
905 896
906#if defined(LIBRESSL_NEW_API)
907int i2d_re_X509_tbs(X509 *x, unsigned char **pp); 897int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
908#endif
909 898
910void X509_get0_signature(const ASN1_BIT_STRING **psig, 899void X509_get0_signature(const ASN1_BIT_STRING **psig,
911 const X509_ALGOR **palg, const X509 *x); 900 const X509_ALGOR **palg, const X509 *x);
@@ -1019,10 +1008,8 @@ int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
1019X509_NAME *X509_REQ_get_subject_name(const X509_REQ *x); 1008X509_NAME *X509_REQ_get_subject_name(const X509_REQ *x);
1020int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey); 1009int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey);
1021EVP_PKEY * X509_REQ_get_pubkey(X509_REQ *req); 1010EVP_PKEY * X509_REQ_get_pubkey(X509_REQ *req);
1022#if defined(LIBRESSL_NEW_API)
1023int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp); 1011int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp);
1024EVP_PKEY * X509_REQ_get0_pubkey(X509_REQ *req); 1012EVP_PKEY * X509_REQ_get0_pubkey(X509_REQ *req);
1025#endif
1026int X509_REQ_extension_nid(int nid); 1013int X509_REQ_extension_nid(int nid);
1027int * X509_REQ_get_extension_nids(void); 1014int * X509_REQ_get_extension_nids(void);
1028void X509_REQ_set_extension_nids(int *nids); 1015void X509_REQ_set_extension_nids(int *nids);
diff --git a/src/lib/libcrypto/x509/x509_set.c b/src/lib/libcrypto/x509/x509_set.c
index e086c021cd..c4ce8e5674 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.18 2021/10/21 13:02:01 tb Exp $ */ 1/* $OpenBSD: x509_set.c,v 1.19 2021/11/01 08:14:36 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 *
@@ -217,10 +217,8 @@ X509_get_signature_type(const X509 *x)
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 219
220#if defined(LIBRESSL_NEW_API)
221X509_PUBKEY * 220X509_PUBKEY *
222X509_get_X509_PUBKEY(const X509 *x) 221X509_get_X509_PUBKEY(const X509 *x)
223{ 222{
224 return x->cert_info->key; 223 return x->cert_info->key;
225} 224}
226#endif
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h
index 676145cca7..61ea11b71a 100644
--- a/src/lib/libcrypto/x509/x509_vfy.h
+++ b/src/lib/libcrypto/x509/x509_vfy.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_vfy.h,v 1.44 2021/10/31 16:51:16 tb Exp $ */ 1/* $OpenBSD: x509_vfy.h,v 1.45 2021/11/01 08:14:36 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 *
@@ -201,10 +201,6 @@ struct x509_store_st {
201 201
202int X509_STORE_set_depth(X509_STORE *store, int depth); 202int X509_STORE_set_depth(X509_STORE *store, int depth);
203 203
204#if !defined(LIBRESSL_NEW_API)
205#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func))
206#endif
207
208#if defined(LIBRESSL_CRYPTO_INTERNAL) || !defined(LIBRESSL_OPAQUE_X509) 204#if defined(LIBRESSL_CRYPTO_INTERNAL) || !defined(LIBRESSL_OPAQUE_X509)
209/* This is the functions plus an instance of the local variables. */ 205/* This is the functions plus an instance of the local variables. */
210struct x509_lookup_st { 206struct x509_lookup_st {
@@ -425,10 +421,8 @@ void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
425 | X509_V_FLAG_INHIBIT_ANY \ 421 | X509_V_FLAG_INHIBIT_ANY \
426 | X509_V_FLAG_INHIBIT_MAP) 422 | X509_V_FLAG_INHIBIT_MAP)
427 423
428#if defined(LIBRESSL_NEW_API)
429X509_OBJECT *X509_OBJECT_new(void); 424X509_OBJECT *X509_OBJECT_new(void);
430void X509_OBJECT_free(X509_OBJECT *a); 425void X509_OBJECT_free(X509_OBJECT *a);
431#endif
432int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type, 426int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type,
433 X509_NAME *name); 427 X509_NAME *name);
434X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h, 428X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,
@@ -492,10 +486,8 @@ int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
492int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, 486int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type,
493 X509_NAME *name, X509_OBJECT *ret); 487 X509_NAME *name, X509_OBJECT *ret);
494#define X509_STORE_get_by_subject X509_STORE_CTX_get_by_subject 488#define X509_STORE_get_by_subject X509_STORE_CTX_get_by_subject
495#if defined(LIBRESSL_NEW_API)
496X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs, 489X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs,
497 X509_LOOKUP_TYPE type, X509_NAME *name); 490 X509_LOOKUP_TYPE type, X509_NAME *name);
498#endif
499 491
500int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, 492int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
501 long argl, char **ret); 493 long argl, char **ret);
@@ -530,13 +522,9 @@ void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx);
530int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); 522int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
531void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s); 523void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s);
532int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); 524int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
533#if defined(LIBRESSL_NEW_API)
534void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth); 525void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth);
535#endif
536X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); 526X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
537#if defined(LIBRESSL_NEW_API)
538void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x); 527void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x);
539#endif
540X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx); 528X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
541X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx); 529X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
542X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx); 530X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
@@ -552,7 +540,6 @@ int X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose,
552void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags); 540void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
553void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags, 541void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
554 time_t t); 542 time_t t);
555#if defined(LIBRESSL_NEW_API)
556void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); 543void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
557int (*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *); 544int (*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *);
558void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, 545void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx,
@@ -560,15 +547,12 @@ void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx,
560#define X509_STORE_set_verify_func(ctx, func) \ 547#define X509_STORE_set_verify_func(ctx, func) \
561 X509_STORE_set_verify((ctx), (func)) 548 X509_STORE_set_verify((ctx), (func))
562int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *); 549int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *);
563#endif
564void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, 550void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
565 int (*verify_cb)(int, X509_STORE_CTX *)); 551 int (*verify_cb)(int, X509_STORE_CTX *));
566 552
567X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx); 553X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
568int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx); 554int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
569#if defined(LIBRESSL_NEW_API)
570int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx); 555int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx);
571#endif
572 556
573X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx); 557X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
574void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param); 558void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
diff --git a/src/lib/libcrypto/x509/x509v3.h b/src/lib/libcrypto/x509/x509v3.h
index 62ed038d33..2d8ab6fc6e 100644
--- a/src/lib/libcrypto/x509/x509v3.h
+++ b/src/lib/libcrypto/x509/x509v3.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509v3.h,v 1.9 2021/10/23 17:43:06 tb Exp $ */ 1/* $OpenBSD: x509v3.h,v 1.10 2021/11/01 08:14:36 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 1999. 3 * project 1999.
4 */ 4 */
@@ -800,11 +800,9 @@ char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp);
800int X509_PURPOSE_get_trust(const X509_PURPOSE *xp); 800int X509_PURPOSE_get_trust(const X509_PURPOSE *xp);
801void X509_PURPOSE_cleanup(void); 801void X509_PURPOSE_cleanup(void);
802int X509_PURPOSE_get_id(const X509_PURPOSE *); 802int X509_PURPOSE_get_id(const X509_PURPOSE *);
803#if defined(LIBRESSL_NEW_API)
804uint32_t X509_get_extension_flags(X509 *x); 803uint32_t X509_get_extension_flags(X509 *x);
805uint32_t X509_get_key_usage(X509 *x); 804uint32_t X509_get_key_usage(X509 *x);
806uint32_t X509_get_extended_key_usage(X509 *x); 805uint32_t X509_get_extended_key_usage(X509 *x);
807#endif
808 806
809STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); 807STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x);
810STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); 808STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x);
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index 258cde67e4..e313268216 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.214 2021/10/23 20:42:50 beck Exp $ */ 1/* $OpenBSD: ssl.h,v 1.215 2021/11/01 08:14:36 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 *
@@ -506,7 +506,6 @@ void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version,
506#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) 506#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
507#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg)) 507#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
508typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line); 508typedef void (*SSL_CTX_keylog_cb_func)(const SSL *ssl, const char *line);
509#if defined(LIBRESSL_NEW_API)
510void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb); 509void SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb);
511SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx); 510SSL_CTX_keylog_cb_func SSL_CTX_get_keylog_callback(const SSL_CTX *ctx);
512int SSL_set_num_tickets(SSL *s, size_t num_tickets); 511int SSL_set_num_tickets(SSL *s, size_t num_tickets);
@@ -514,7 +513,6 @@ size_t SSL_get_num_tickets(const SSL *s);
514int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets); 513int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
515size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx); 514size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
516STACK_OF(X509) *SSL_get0_verified_chain(const SSL *s); 515STACK_OF(X509) *SSL_get0_verified_chain(const SSL *s);
517#endif
518 516
519#ifndef LIBRESSL_INTERNAL 517#ifndef LIBRESSL_INTERNAL
520struct ssl_aead_ctx_st; 518struct ssl_aead_ctx_st;
@@ -1294,11 +1292,9 @@ int SSL_is_server(const SSL *s);
1294int SSL_read(SSL *ssl, void *buf, int num); 1292int SSL_read(SSL *ssl, void *buf, int num);
1295int SSL_peek(SSL *ssl, void *buf, int num); 1293int SSL_peek(SSL *ssl, void *buf, int num);
1296int SSL_write(SSL *ssl, const void *buf, int num); 1294int SSL_write(SSL *ssl, const void *buf, int num);
1297#if defined(LIBRESSL_NEW_API)
1298int SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *bytes_read); 1295int SSL_read_ex(SSL *ssl, void *buf, size_t num, size_t *bytes_read);
1299int SSL_peek_ex(SSL *ssl, void *buf, size_t num, size_t *bytes_peeked); 1296int SSL_peek_ex(SSL *ssl, void *buf, size_t num, size_t *bytes_peeked);
1300int SSL_write_ex(SSL *ssl, const void *buf, size_t num, size_t *bytes_written); 1297int SSL_write_ex(SSL *ssl, const void *buf, size_t num, size_t *bytes_written);
1301#endif
1302 1298
1303#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL) 1299#if defined(LIBRESSL_HAS_TLS1_3) || defined(LIBRESSL_INTERNAL)
1304uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx); 1300uint32_t SSL_CTX_get_max_early_data(const SSL_CTX *ctx);