From 9e4ccc5228dcbfa0dfefbcb77f4fbc4409e63949 Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 1 Nov 2021 08:14:36 +0000 Subject: Unifdef LIBRESSL_NEW_API. Now that the library is bumped, this is no longer needed. ok jsing --- src/lib/libcrypto/x509/x509.h | 15 +-------------- src/lib/libcrypto/x509/x509_set.c | 4 +--- src/lib/libcrypto/x509/x509_vfy.h | 18 +----------------- src/lib/libcrypto/x509/x509v3.h | 4 +--- 4 files changed, 4 insertions(+), 37 deletions(-) (limited to 'src/lib/libcrypto/x509') 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 @@ -/* $OpenBSD: x509.h,v 1.85 2021/10/31 16:51:16 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.86 2021/11/01 08:14:36 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -594,9 +594,7 @@ extern "C" { int X509_CRL_up_ref(X509_CRL *x); int X509_CRL_get_signature_nid(const X509_CRL *crl); -#if defined(LIBRESSL_NEW_API) int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp); -#endif const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl); long X509_CRL_get_version(const X509_CRL *crl); @@ -626,12 +624,7 @@ void X509_CRL_METHOD_free(X509_CRL_METHOD *m); void X509_CRL_set_meth_data(X509_CRL *crl, void *dat); void *X509_CRL_get_meth_data(X509_CRL *crl); -#if defined(LIBRESSL_NEW_API) X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x); -#else -#define X509_get_X509_PUBKEY(x) (x)->cert_info->key -#endif - const char *X509_verify_cert_error_string(long n); @@ -831,12 +824,10 @@ void X509_SIG_free(X509_SIG *a); X509_SIG *d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len); int i2d_X509_SIG(X509_SIG *a, unsigned char **out); extern const ASN1_ITEM X509_SIG_it; -#if defined(LIBRESSL_NEW_API) void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg, const ASN1_OCTET_STRING **pdigest); void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, ASN1_OCTET_STRING **pdigest); -#endif X509_REQ_INFO *X509_REQ_INFO_new(void); void X509_REQ_INFO_free(X509_REQ_INFO *a); @@ -903,9 +894,7 @@ void *X509_get_ex_data(X509 *r, int idx); int i2d_X509_AUX(X509 *a,unsigned char **pp); X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); -#if defined(LIBRESSL_NEW_API) int i2d_re_X509_tbs(X509 *x, unsigned char **pp); -#endif void X509_get0_signature(const ASN1_BIT_STRING **psig, const X509_ALGOR **palg, const X509 *x); @@ -1019,10 +1008,8 @@ int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name); X509_NAME *X509_REQ_get_subject_name(const X509_REQ *x); int X509_REQ_set_pubkey(X509_REQ *x, EVP_PKEY *pkey); EVP_PKEY * X509_REQ_get_pubkey(X509_REQ *req); -#if defined(LIBRESSL_NEW_API) int i2d_re_X509_REQ_tbs(X509_REQ *req, unsigned char **pp); EVP_PKEY * X509_REQ_get0_pubkey(X509_REQ *req); -#endif int X509_REQ_extension_nid(int nid); int * X509_REQ_get_extension_nids(void); void 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 @@ -/* $OpenBSD: x509_set.c,v 1.18 2021/10/21 13:02:01 tb Exp $ */ +/* $OpenBSD: x509_set.c,v 1.19 2021/11/01 08:14:36 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -217,10 +217,8 @@ X509_get_signature_type(const X509 *x) return EVP_PKEY_type(OBJ_obj2nid(x->sig_alg->algorithm)); } -#if defined(LIBRESSL_NEW_API) X509_PUBKEY * X509_get_X509_PUBKEY(const X509 *x) { return x->cert_info->key; } -#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 @@ -/* $OpenBSD: x509_vfy.h,v 1.44 2021/10/31 16:51:16 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.45 2021/11/01 08:14:36 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -201,10 +201,6 @@ struct x509_store_st { int X509_STORE_set_depth(X509_STORE *store, int depth); -#if !defined(LIBRESSL_NEW_API) -#define X509_STORE_set_verify_func(ctx,func) ((ctx)->verify=(func)) -#endif - #if defined(LIBRESSL_CRYPTO_INTERNAL) || !defined(LIBRESSL_OPAQUE_X509) /* This is the functions plus an instance of the local variables. */ struct x509_lookup_st { @@ -425,10 +421,8 @@ void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth); | X509_V_FLAG_INHIBIT_ANY \ | X509_V_FLAG_INHIBIT_MAP) -#if defined(LIBRESSL_NEW_API) X509_OBJECT *X509_OBJECT_new(void); void X509_OBJECT_free(X509_OBJECT *a); -#endif int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type, X509_NAME *name); X509_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); int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, X509_NAME *name, X509_OBJECT *ret); #define X509_STORE_get_by_subject X509_STORE_CTX_get_by_subject -#if defined(LIBRESSL_NEW_API) X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type, X509_NAME *name); -#endif int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret); @@ -530,13 +522,9 @@ void * X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx,int idx); int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx); void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx,int s); int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx); -#if defined(LIBRESSL_NEW_API) void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth); -#endif X509 * X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx); -#if defined(LIBRESSL_NEW_API) void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x); -#endif X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx); X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx); X509_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, void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags); void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags, time_t t); -#if defined(LIBRESSL_NEW_API) void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *ctx, STACK_OF(X509) *sk); int (*X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx))(X509_STORE_CTX *); void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, @@ -560,15 +547,12 @@ void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx, #define X509_STORE_set_verify_func(ctx, func) \ X509_STORE_set_verify((ctx), (func)) int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *); -#endif void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, int (*verify_cb)(int, X509_STORE_CTX *)); X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx); int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx); -#if defined(LIBRESSL_NEW_API) int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx); -#endif X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx); void 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 @@ -/* $OpenBSD: x509v3.h,v 1.9 2021/10/23 17:43:06 tb Exp $ */ +/* $OpenBSD: x509v3.h,v 1.10 2021/11/01 08:14:36 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -800,11 +800,9 @@ char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp); int X509_PURPOSE_get_trust(const X509_PURPOSE *xp); void X509_PURPOSE_cleanup(void); int X509_PURPOSE_get_id(const X509_PURPOSE *); -#if defined(LIBRESSL_NEW_API) uint32_t X509_get_extension_flags(X509 *x); uint32_t X509_get_key_usage(X509 *x); uint32_t X509_get_extended_key_usage(X509 *x); -#endif STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x); STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x); -- cgit v1.2.3-55-g6feb