diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-14 07:49:50 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2022-01-14 07:49:50 +0000 |
commit | 02d9cbd67f4cb3f6ccf4b8b25441e80e92fb316f (patch) | |
tree | 241aea0c693c463e98fc90ac9554586f2e5960a3 /lib/libcrypto | |
parent | 79f416d24d4bcd32a55ee368b8896e7a5d95eed4 (diff) |
Unifdef LIBRESSL_OPAQUE_* and LIBRESSL_NEXT_API
This marks the start of major surgery in libcrypto. Do not attempt to
build the tree for a while (~50 commits).
Diffstat (limited to 'lib/libcrypto')
-rw-r--r-- | lib/libcrypto/bio/bio.h | 6 | ||||
-rw-r--r-- | lib/libcrypto/bn/bn.h | 66 | ||||
-rw-r--r-- | lib/libcrypto/dh/dh.h | 6 | ||||
-rw-r--r-- | lib/libcrypto/dsa/dsa.h | 6 | ||||
-rw-r--r-- | lib/libcrypto/ecdsa/ecdsa.h | 4 | ||||
-rw-r--r-- | lib/libcrypto/evp/evp.h | 16 | ||||
-rw-r--r-- | lib/libcrypto/objects/objects.h | 4 | ||||
-rw-r--r-- | lib/libcrypto/pem/pem.h | 4 | ||||
-rw-r--r-- | lib/libcrypto/rsa/rsa.h | 4 | ||||
-rw-r--r-- | lib/libcrypto/x509/x509_vfy.h | 6 |
10 files changed, 10 insertions, 112 deletions
diff --git a/lib/libcrypto/bio/bio.h b/lib/libcrypto/bio/bio.h index 23d47367d43..d715deb2eb4 100644 --- a/lib/libcrypto/bio/bio.h +++ b/lib/libcrypto/bio/bio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bio.h,v 1.50 2022/01/05 20:48:44 tb Exp $ */ +/* $OpenBSD: bio.h,v 1.51 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -632,14 +632,10 @@ BIO * BIO_pop(BIO *b); void BIO_free_all(BIO *a); BIO * BIO_find_type(BIO *b, int bio_type); BIO * BIO_next(BIO *b); -#if defined(LIBRESSL_OPAQUE_BIO) || defined(LIBRESSL_CRYPTO_INTERNAL) void BIO_set_next(BIO *b, BIO *next); -#endif BIO * BIO_get_retry_BIO(BIO *bio, int *reason); int BIO_get_retry_reason(BIO *bio); -#if defined(LIBRESSL_OPAQUE_BIO) || defined(LIBRESSL_CRYPTO_INTERNAL) void BIO_set_retry_reason(BIO *bio, int reason); -#endif BIO * BIO_dup_chain(BIO *in); int BIO_nread0(BIO *bio, char **buf); diff --git a/lib/libcrypto/bn/bn.h b/lib/libcrypto/bn/bn.h index db5e7f908c1..5d9f17c4d94 100644 --- a/lib/libcrypto/bn/bn.h +++ b/lib/libcrypto/bn/bn.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bn.h,v 1.50 2021/12/04 16:11:10 tb Exp $ */ +/* $OpenBSD: bn.h,v 1.51 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -228,14 +228,9 @@ extern "C" { #ifndef OPENSSL_NO_DEPRECATED #define BN_FLG_FREE 0x8000 /* used for debugging */ #endif -#if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) void BN_set_flags(BIGNUM *b, int n); int BN_get_flags(const BIGNUM *b, int n); void BN_with_flags(BIGNUM *dest, const BIGNUM *src, int flags); -#else -#define BN_set_flags(b,n) ((b)->flags|=(n)) -#define BN_get_flags(b,n) ((b)->flags&(n)) -#endif /* Values for |top| in BN_rand() */ #define BN_RAND_TOP_ANY -1 @@ -246,19 +241,6 @@ void BN_with_flags(BIGNUM *dest, const BIGNUM *src, int flags); #define BN_RAND_BOTTOM_ANY 0 #define BN_RAND_BOTTOM_ODD 1 -#if !defined(LIBRESSL_OPAQUE_BN) && !defined(LIBRESSL_CRYPTO_INTERNAL) -/* get a clone of a BIGNUM with changed flags, for *temporary* use only - * (the two BIGNUMs cannot not be used in parallel!) */ -#define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \ - (dest)->top=(b)->top, \ - (dest)->dmax=(b)->dmax, \ - (dest)->neg=(b)->neg, \ - (dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \ - | ((b)->flags & ~BN_FLG_MALLOCED) \ - | BN_FLG_STATIC_DATA \ - | (n))) -#endif - /* Move to bn_lcl.h */ struct bignum_st { BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ @@ -313,7 +295,6 @@ void BN_GENCB_free(BN_GENCB *cb); /* Wrapper function to make using BN_GENCB easier, */ int BN_GENCB_call(BN_GENCB *cb, int a, int b); -#if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) /* Populate a BN_GENCB structure with an "old"-style callback */ void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *), void *cb_arg); @@ -321,20 +302,6 @@ void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *), /* Populate a BN_GENCB structure with a "new"-style callback */ void BN_GENCB_set(BN_GENCB *gencb, int (*callback)(int, int, BN_GENCB *), void *cb_arg); -#else -/* Macro to populate a BN_GENCB structure with an "old"-style callback */ -#define BN_GENCB_set_old(gencb, callback, cb_arg) { \ - BN_GENCB *tmp_gencb = (gencb); \ - tmp_gencb->ver = 1; \ - tmp_gencb->arg = (cb_arg); \ - tmp_gencb->cb.cb_1 = (callback); } -/* Macro to populate a BN_GENCB structure with a "new"-style callback */ -#define BN_GENCB_set(gencb, callback, cb_arg) { \ - BN_GENCB *tmp_gencb = (gencb); \ - tmp_gencb->ver = 2; \ - tmp_gencb->arg = (cb_arg); \ - tmp_gencb->cb.cb_2 = (callback); } -#endif /* !LIBRESSL_CRYPTO_INTERNAL */ void *BN_GENCB_get_arg(BN_GENCB *cb); @@ -416,7 +383,6 @@ void *BN_GENCB_get_arg(BN_GENCB *cb); #define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) -#if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w); int BN_is_zero(const BIGNUM *a); int BN_is_one(const BIGNUM *a); @@ -427,23 +393,6 @@ int BN_is_odd(const BIGNUM *a); void BN_zero_ex(BIGNUM *a); -#else -#define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \ - (((w) == 0) && ((a)->top == 0))) -#define BN_is_zero(a) ((a)->top == 0) -#define BN_is_one(a) (BN_abs_is_word((a),1) && !(a)->neg) -#define BN_is_word(a,w) (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg)) -#define BN_is_odd(a) (((a)->top > 0) && ((a)->d[0] & 1)) - -#define BN_one(a) (BN_set_word((a),1)) -#define BN_zero_ex(a) \ - do { \ - BIGNUM *_tmp_bn = (a); \ - _tmp_bn->top = 0; \ - _tmp_bn->neg = 0; \ - } while(0) -#endif /* LIBRESSL_OPAQUE_BN */ - #ifdef OPENSSL_NO_DEPRECATED #define BN_zero(a) BN_zero_ex(a) #else @@ -490,15 +439,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); */ void BN_set_negative(BIGNUM *b, int n); -#if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) int BN_is_negative(const BIGNUM *b); -#else -/** BN_is_negative returns 1 if the BIGNUM is negative - * \param a pointer to the BIGNUM object - * \return 1 if a < 0 and 0 otherwise - */ -#define BN_is_negative(a) ((a)->neg != 0) -#endif #ifndef LIBRESSL_INTERNAL int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, @@ -613,13 +554,8 @@ BN_MONT_CTX *BN_MONT_CTX_new(void ); void BN_MONT_CTX_init(BN_MONT_CTX *ctx); int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_MONT_CTX *mont, BN_CTX *ctx); -#if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); -#else -#define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\ - (r),(a),&((mont)->RR),(mont),(ctx)) -#endif int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx); void BN_MONT_CTX_free(BN_MONT_CTX *mont); diff --git a/lib/libcrypto/dh/dh.h b/lib/libcrypto/dh/dh.h index 21e840efc4b..4545035afb2 100644 --- a/lib/libcrypto/dh/dh.h +++ b/lib/libcrypto/dh/dh.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dh.h,v 1.30 2022/01/10 12:00:52 tb Exp $ */ +/* $OpenBSD: dh.h,v 1.31 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -199,19 +199,15 @@ void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); -#if defined(LIBRESSL_OPAQUE_DH) || defined(LIBRESSL_CRYPTO_INTERNAL) const BIGNUM *DH_get0_p(const DH *dh); const BIGNUM *DH_get0_q(const DH *dh); const BIGNUM *DH_get0_g(const DH *dh); const BIGNUM *DH_get0_priv_key(const DH *dh); const BIGNUM *DH_get0_pub_key(const DH *dh); -#endif void DH_clear_flags(DH *dh, int flags); int DH_test_flags(const DH *dh, int flags); void DH_set_flags(DH *dh, int flags); -#if defined(LIBRESSL_OPAQUE_DH) || defined(LIBRESSL_CRYPTO_INTERNAL) long DH_get_length(const DH *dh); -#endif int DH_set_length(DH *dh, long length); /* Deprecated version */ diff --git a/lib/libcrypto/dsa/dsa.h b/lib/libcrypto/dsa/dsa.h index 7a5c2cd1c03..b0220856cc3 100644 --- a/lib/libcrypto/dsa/dsa.h +++ b/lib/libcrypto/dsa/dsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa.h,v 1.33 2022/01/05 20:52:14 tb Exp $ */ +/* $OpenBSD: dsa.h,v 1.34 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -202,9 +202,7 @@ void DSA_free(DSA *r); /* "up" the DSA object's reference count */ int DSA_up_ref(DSA *r); int DSA_size(const DSA *); -#if defined(LIBRESSL_OPAQUE_DSA) || defined(LIBRESSL_CRYPTO_INTERNAL) int DSA_bits(const DSA *d); -#endif /* next 4 return -1 on error */ int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); int DSA_sign(int type,const unsigned char *dgst,int dlen, @@ -270,13 +268,11 @@ void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); -#if defined(LIBRESSL_OPAQUE_DSA) || defined(LIBRESSL_CRYPTO_INTERNAL) const BIGNUM *DSA_get0_p(const DSA *d); const BIGNUM *DSA_get0_q(const DSA *d); const BIGNUM *DSA_get0_g(const DSA *d); const BIGNUM *DSA_get0_pub_key(const DSA *d); const BIGNUM *DSA_get0_priv_key(const DSA *d); -#endif void DSA_clear_flags(DSA *d, int flags); int DSA_test_flags(const DSA *d, int flags); void DSA_set_flags(DSA *d, int flags); diff --git a/lib/libcrypto/ecdsa/ecdsa.h b/lib/libcrypto/ecdsa/ecdsa.h index 7b0a25468a6..7b57f534eff 100644 --- a/lib/libcrypto/ecdsa/ecdsa.h +++ b/lib/libcrypto/ecdsa/ecdsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ecdsa.h,v 1.9 2022/01/05 20:39:04 tb Exp $ */ +/* $OpenBSD: ecdsa.h,v 1.10 2022/01/14 07:49:49 tb Exp $ */ /** * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions * \author Written by Nils Larsch for the OpenSSL project @@ -140,10 +140,8 @@ ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len); */ void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); -#if defined(LIBRESSL_OPAQUE_ECDSA) || defined(LIBRESSL_CRYPTO_INTERNAL) const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig); const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig); -#endif /** Setter for r and s fields of ECDSA_SIG * \param sig pointer to ECDSA_SIG pointer diff --git a/lib/libcrypto/evp/evp.h b/lib/libcrypto/evp/evp.h index df71b0ac162..012b06befc8 100644 --- a/lib/libcrypto/evp/evp.h +++ b/lib/libcrypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.96 2022/01/12 08:52:25 tb Exp $ */ +/* $OpenBSD: evp.h,v 1.97 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -495,7 +495,6 @@ int EVP_MD_size(const EVP_MD *md); int EVP_MD_block_size(const EVP_MD *md); unsigned long EVP_MD_flags(const EVP_MD *md); -#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); void EVP_MD_meth_free(EVP_MD *md); EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); @@ -513,14 +512,11 @@ int EVP_MD_meth_set_copy(EVP_MD *md, int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx)); int EVP_MD_meth_set_ctrl(EVP_MD *md, int (*ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)); -#endif const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); -#if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx); void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); -#endif #define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) #define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) #define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) @@ -546,11 +542,9 @@ int EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); -#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx); void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data); unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); -#endif #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); #define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) @@ -1107,14 +1101,12 @@ void EVP_PKEY_asn1_set_free(EVP_PKEY_ASN1_METHOD *ameth, void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2)); -#if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_check)(const EVP_PKEY *pk)); void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_public_check)(const EVP_PKEY *pk)); void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, int (*pkey_check)(const EVP_PKEY *pk)); -#endif #define EVP_PKEY_OP_UNDEFINED 0 #define EVP_PKEY_OP_PARAMGEN (1<<1) @@ -1242,11 +1234,9 @@ int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); -#if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) int EVP_PKEY_check(EVP_PKEY_CTX *ctx); int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx); int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); -#endif void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx); @@ -1313,14 +1303,12 @@ void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2), int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value)); -#if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, int (*check)(EVP_PKEY *pkey)); void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, int (*public_check)(EVP_PKEY *pkey)); void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, int (*param_check)(EVP_PKEY *pkey)); -#endif /* Authenticated Encryption with Additional Data. * @@ -1378,7 +1366,6 @@ typedef struct evp_aead_ctx_st { * should be used. */ #define EVP_AEAD_DEFAULT_TAG_LENGTH 0 -#if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) /* EVP_AEAD_CTX_new allocates a new context for use with EVP_AEAD_CTX_init. * It can be cleaned up for reuse with EVP_AEAD_CTX_cleanup and must be freed * with EVP_AEAD_CTX_free. */ @@ -1386,7 +1373,6 @@ EVP_AEAD_CTX *EVP_AEAD_CTX_new(void); /* EVP_AEAD_CTX_free releases all memory owned by the context. */ void EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx); -#endif /* EVP_AEAD_CTX_init initializes the context for the given AEAD algorithm. * The implementation argument may be NULL to choose the default implementation. diff --git a/lib/libcrypto/objects/objects.h b/lib/libcrypto/objects/objects.h index 2aaaefd96b1..3ed792bb348 100644 --- a/lib/libcrypto/objects/objects.h +++ b/lib/libcrypto/objects/objects.h @@ -1,4 +1,4 @@ -/* $OpenBSD: objects.h,v 1.14 2022/01/08 21:36:39 tb Exp $ */ +/* $OpenBSD: objects.h,v 1.15 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1105,10 +1105,8 @@ int OBJ_create(const char *oid, const char *sn, const char *ln); void OBJ_cleanup(void); int OBJ_create_objects(BIO *in); -#if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) size_t OBJ_length(const ASN1_OBJECT *obj); const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj); -#endif int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); diff --git a/lib/libcrypto/pem/pem.h b/lib/libcrypto/pem/pem.h index b447dc4ac2e..0ea04bece70 100644 --- a/lib/libcrypto/pem/pem.h +++ b/lib/libcrypto/pem/pem.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pem.h,v 1.21 2021/12/24 12:59:17 tb Exp $ */ +/* $OpenBSD: pem.h,v 1.22 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -482,11 +482,9 @@ DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) DECLARE_PEM_rw(PUBKEY, EVP_PKEY) -#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, void *u); -#endif int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, char *kstr, int klen, pem_password_cb *cb, void *u); diff --git a/lib/libcrypto/rsa/rsa.h b/lib/libcrypto/rsa/rsa.h index 9dea6c37c05..daefcb85b2e 100644 --- a/lib/libcrypto/rsa/rsa.h +++ b/lib/libcrypto/rsa/rsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa.h,v 1.52 2022/01/05 20:44:12 tb Exp $ */ +/* $OpenBSD: rsa.h,v 1.53 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -470,7 +470,6 @@ void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); -#if defined(LIBRESSL_OPAQUE_RSA) || defined(LIBRESSL_CRYPTO_INTERNAL) const BIGNUM *RSA_get0_n(const RSA *r); const BIGNUM *RSA_get0_e(const RSA *r); const BIGNUM *RSA_get0_d(const RSA *r); @@ -480,7 +479,6 @@ const BIGNUM *RSA_get0_dmp1(const RSA *r); const BIGNUM *RSA_get0_dmq1(const RSA *r); const BIGNUM *RSA_get0_iqmp(const RSA *r); const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r); -#endif void RSA_clear_flags(RSA *r, int flags); int RSA_test_flags(const RSA *r, int flags); void RSA_set_flags(RSA *r, int flags); diff --git a/lib/libcrypto/x509/x509_vfy.h b/lib/libcrypto/x509/x509_vfy.h index a02ef94e2bc..c50624a603d 100644 --- a/lib/libcrypto/x509/x509_vfy.h +++ b/lib/libcrypto/x509/x509_vfy.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.h,v 1.48 2022/01/05 20:18:19 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.49 2022/01/14 07:49:49 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -297,11 +297,9 @@ int X509_STORE_set_trust(X509_STORE *ctx, int trust); int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm); X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); -#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *); X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE *); -#endif void X509_STORE_set_verify_cb(X509_STORE *ctx, int (*verify_cb)(int, X509_STORE_CTX *)); @@ -398,12 +396,10 @@ int (*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))(int, X509_STORE_CTX *); void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, int (*verify_cb)(int, X509_STORE_CTX *)); -#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) typedef int (*X509_STORE_CTX_verify_fn)(X509_STORE_CTX *); void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify); X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx); -#endif #define X509_STORE_set_verify_func(ctx, func) \ X509_STORE_set_verify((ctx), (func)) |