diff options
| author | tb <> | 2022-01-14 07:49:49 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-14 07:49:49 +0000 |
| commit | 82ec18edf4e632f36b6f79c239fdb6961d421a82 (patch) | |
| tree | 86eaa4f6c31663bf615ddba9616c66030e99b5c9 | |
| parent | 163a624a23b933641073fc0e8e52a5541d86335b (diff) | |
| download | openbsd-82ec18edf4e632f36b6f79c239fdb6961d421a82.tar.gz openbsd-82ec18edf4e632f36b6f79c239fdb6961d421a82.tar.bz2 openbsd-82ec18edf4e632f36b6f79c239fdb6961d421a82.zip | |
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 '')
| -rw-r--r-- | src/lib/libcrypto/bio/bio.h | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/bn/bn.h | 66 | ||||
| -rw-r--r-- | src/lib/libcrypto/dh/dh.h | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/dsa/dsa.h | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/ecdsa/ecdsa.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/evp/evp.h | 16 | ||||
| -rw-r--r-- | src/lib/libcrypto/objects/objects.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/pem/pem.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509_vfy.h | 6 |
10 files changed, 10 insertions, 112 deletions
diff --git a/src/lib/libcrypto/bio/bio.h b/src/lib/libcrypto/bio/bio.h index 23d47367d4..d715deb2eb 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.50 2022/01/05 20:48:44 tb Exp $ */ | 1 | /* $OpenBSD: bio.h,v 1.51 2022/01/14 07:49:49 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 | * |
| @@ -632,14 +632,10 @@ BIO * BIO_pop(BIO *b); | |||
| 632 | void BIO_free_all(BIO *a); | 632 | void BIO_free_all(BIO *a); |
| 633 | BIO * BIO_find_type(BIO *b, int bio_type); | 633 | BIO * BIO_find_type(BIO *b, int bio_type); |
| 634 | BIO * BIO_next(BIO *b); | 634 | BIO * BIO_next(BIO *b); |
| 635 | #if defined(LIBRESSL_OPAQUE_BIO) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 636 | void BIO_set_next(BIO *b, BIO *next); | 635 | void BIO_set_next(BIO *b, BIO *next); |
| 637 | #endif | ||
| 638 | BIO * BIO_get_retry_BIO(BIO *bio, int *reason); | 636 | BIO * BIO_get_retry_BIO(BIO *bio, int *reason); |
| 639 | int BIO_get_retry_reason(BIO *bio); | 637 | int BIO_get_retry_reason(BIO *bio); |
| 640 | #if defined(LIBRESSL_OPAQUE_BIO) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 641 | void BIO_set_retry_reason(BIO *bio, int reason); | 638 | void BIO_set_retry_reason(BIO *bio, int reason); |
| 642 | #endif | ||
| 643 | BIO * BIO_dup_chain(BIO *in); | 639 | BIO * BIO_dup_chain(BIO *in); |
| 644 | 640 | ||
| 645 | int BIO_nread0(BIO *bio, char **buf); | 641 | int BIO_nread0(BIO *bio, char **buf); |
diff --git a/src/lib/libcrypto/bn/bn.h b/src/lib/libcrypto/bn/bn.h index db5e7f908c..5d9f17c4d9 100644 --- a/src/lib/libcrypto/bn/bn.h +++ b/src/lib/libcrypto/bn/bn.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn.h,v 1.50 2021/12/04 16:11:10 tb Exp $ */ | 1 | /* $OpenBSD: bn.h,v 1.51 2022/01/14 07:49:49 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -228,14 +228,9 @@ extern "C" { | |||
| 228 | #ifndef OPENSSL_NO_DEPRECATED | 228 | #ifndef OPENSSL_NO_DEPRECATED |
| 229 | #define BN_FLG_FREE 0x8000 /* used for debugging */ | 229 | #define BN_FLG_FREE 0x8000 /* used for debugging */ |
| 230 | #endif | 230 | #endif |
| 231 | #if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 232 | void BN_set_flags(BIGNUM *b, int n); | 231 | void BN_set_flags(BIGNUM *b, int n); |
| 233 | int BN_get_flags(const BIGNUM *b, int n); | 232 | int BN_get_flags(const BIGNUM *b, int n); |
| 234 | void BN_with_flags(BIGNUM *dest, const BIGNUM *src, int flags); | 233 | void BN_with_flags(BIGNUM *dest, const BIGNUM *src, int flags); |
| 235 | #else | ||
| 236 | #define BN_set_flags(b,n) ((b)->flags|=(n)) | ||
| 237 | #define BN_get_flags(b,n) ((b)->flags&(n)) | ||
| 238 | #endif | ||
| 239 | 234 | ||
| 240 | /* Values for |top| in BN_rand() */ | 235 | /* Values for |top| in BN_rand() */ |
| 241 | #define BN_RAND_TOP_ANY -1 | 236 | #define BN_RAND_TOP_ANY -1 |
| @@ -246,19 +241,6 @@ void BN_with_flags(BIGNUM *dest, const BIGNUM *src, int flags); | |||
| 246 | #define BN_RAND_BOTTOM_ANY 0 | 241 | #define BN_RAND_BOTTOM_ANY 0 |
| 247 | #define BN_RAND_BOTTOM_ODD 1 | 242 | #define BN_RAND_BOTTOM_ODD 1 |
| 248 | 243 | ||
| 249 | #if !defined(LIBRESSL_OPAQUE_BN) && !defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 250 | /* get a clone of a BIGNUM with changed flags, for *temporary* use only | ||
| 251 | * (the two BIGNUMs cannot not be used in parallel!) */ | ||
| 252 | #define BN_with_flags(dest,b,n) ((dest)->d=(b)->d, \ | ||
| 253 | (dest)->top=(b)->top, \ | ||
| 254 | (dest)->dmax=(b)->dmax, \ | ||
| 255 | (dest)->neg=(b)->neg, \ | ||
| 256 | (dest)->flags=(((dest)->flags & BN_FLG_MALLOCED) \ | ||
| 257 | | ((b)->flags & ~BN_FLG_MALLOCED) \ | ||
| 258 | | BN_FLG_STATIC_DATA \ | ||
| 259 | | (n))) | ||
| 260 | #endif | ||
| 261 | |||
| 262 | /* Move to bn_lcl.h */ | 244 | /* Move to bn_lcl.h */ |
| 263 | struct bignum_st { | 245 | struct bignum_st { |
| 264 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ | 246 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ |
| @@ -313,7 +295,6 @@ void BN_GENCB_free(BN_GENCB *cb); | |||
| 313 | /* Wrapper function to make using BN_GENCB easier, */ | 295 | /* Wrapper function to make using BN_GENCB easier, */ |
| 314 | int BN_GENCB_call(BN_GENCB *cb, int a, int b); | 296 | int BN_GENCB_call(BN_GENCB *cb, int a, int b); |
| 315 | 297 | ||
| 316 | #if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 317 | /* Populate a BN_GENCB structure with an "old"-style callback */ | 298 | /* Populate a BN_GENCB structure with an "old"-style callback */ |
| 318 | void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *), | 299 | void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *), |
| 319 | void *cb_arg); | 300 | void *cb_arg); |
| @@ -321,20 +302,6 @@ void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *), | |||
| 321 | /* Populate a BN_GENCB structure with a "new"-style callback */ | 302 | /* Populate a BN_GENCB structure with a "new"-style callback */ |
| 322 | void BN_GENCB_set(BN_GENCB *gencb, int (*callback)(int, int, BN_GENCB *), | 303 | void BN_GENCB_set(BN_GENCB *gencb, int (*callback)(int, int, BN_GENCB *), |
| 323 | void *cb_arg); | 304 | void *cb_arg); |
| 324 | #else | ||
| 325 | /* Macro to populate a BN_GENCB structure with an "old"-style callback */ | ||
| 326 | #define BN_GENCB_set_old(gencb, callback, cb_arg) { \ | ||
| 327 | BN_GENCB *tmp_gencb = (gencb); \ | ||
| 328 | tmp_gencb->ver = 1; \ | ||
| 329 | tmp_gencb->arg = (cb_arg); \ | ||
| 330 | tmp_gencb->cb.cb_1 = (callback); } | ||
| 331 | /* Macro to populate a BN_GENCB structure with a "new"-style callback */ | ||
| 332 | #define BN_GENCB_set(gencb, callback, cb_arg) { \ | ||
| 333 | BN_GENCB *tmp_gencb = (gencb); \ | ||
| 334 | tmp_gencb->ver = 2; \ | ||
| 335 | tmp_gencb->arg = (cb_arg); \ | ||
| 336 | tmp_gencb->cb.cb_2 = (callback); } | ||
| 337 | #endif /* !LIBRESSL_CRYPTO_INTERNAL */ | ||
| 338 | 305 | ||
| 339 | void *BN_GENCB_get_arg(BN_GENCB *cb); | 306 | void *BN_GENCB_get_arg(BN_GENCB *cb); |
| 340 | 307 | ||
| @@ -416,7 +383,6 @@ void *BN_GENCB_get_arg(BN_GENCB *cb); | |||
| 416 | 383 | ||
| 417 | #define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) | 384 | #define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) |
| 418 | 385 | ||
| 419 | #if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 420 | int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w); | 386 | int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w); |
| 421 | int BN_is_zero(const BIGNUM *a); | 387 | int BN_is_zero(const BIGNUM *a); |
| 422 | int BN_is_one(const BIGNUM *a); | 388 | int BN_is_one(const BIGNUM *a); |
| @@ -427,23 +393,6 @@ int BN_is_odd(const BIGNUM *a); | |||
| 427 | 393 | ||
| 428 | void BN_zero_ex(BIGNUM *a); | 394 | void BN_zero_ex(BIGNUM *a); |
| 429 | 395 | ||
| 430 | #else | ||
| 431 | #define BN_abs_is_word(a,w) ((((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) || \ | ||
| 432 | (((w) == 0) && ((a)->top == 0))) | ||
| 433 | #define BN_is_zero(a) ((a)->top == 0) | ||
| 434 | #define BN_is_one(a) (BN_abs_is_word((a),1) && !(a)->neg) | ||
| 435 | #define BN_is_word(a,w) (BN_abs_is_word((a),(w)) && (!(w) || !(a)->neg)) | ||
| 436 | #define BN_is_odd(a) (((a)->top > 0) && ((a)->d[0] & 1)) | ||
| 437 | |||
| 438 | #define BN_one(a) (BN_set_word((a),1)) | ||
| 439 | #define BN_zero_ex(a) \ | ||
| 440 | do { \ | ||
| 441 | BIGNUM *_tmp_bn = (a); \ | ||
| 442 | _tmp_bn->top = 0; \ | ||
| 443 | _tmp_bn->neg = 0; \ | ||
| 444 | } while(0) | ||
| 445 | #endif /* LIBRESSL_OPAQUE_BN */ | ||
| 446 | |||
| 447 | #ifdef OPENSSL_NO_DEPRECATED | 396 | #ifdef OPENSSL_NO_DEPRECATED |
| 448 | #define BN_zero(a) BN_zero_ex(a) | 397 | #define BN_zero(a) BN_zero_ex(a) |
| 449 | #else | 398 | #else |
| @@ -490,15 +439,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx); | |||
| 490 | */ | 439 | */ |
| 491 | void BN_set_negative(BIGNUM *b, int n); | 440 | void BN_set_negative(BIGNUM *b, int n); |
| 492 | 441 | ||
| 493 | #if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 494 | int BN_is_negative(const BIGNUM *b); | 442 | int BN_is_negative(const BIGNUM *b); |
| 495 | #else | ||
| 496 | /** BN_is_negative returns 1 if the BIGNUM is negative | ||
| 497 | * \param a pointer to the BIGNUM object | ||
| 498 | * \return 1 if a < 0 and 0 otherwise | ||
| 499 | */ | ||
| 500 | #define BN_is_negative(a) ((a)->neg != 0) | ||
| 501 | #endif | ||
| 502 | 443 | ||
| 503 | #ifndef LIBRESSL_INTERNAL | 444 | #ifndef LIBRESSL_INTERNAL |
| 504 | int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, | 445 | 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 ); | |||
| 613 | void BN_MONT_CTX_init(BN_MONT_CTX *ctx); | 554 | void BN_MONT_CTX_init(BN_MONT_CTX *ctx); |
| 614 | int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, | 555 | int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, |
| 615 | BN_MONT_CTX *mont, BN_CTX *ctx); | 556 | BN_MONT_CTX *mont, BN_CTX *ctx); |
| 616 | #if defined(LIBRESSL_OPAQUE_BN) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 617 | int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, | 557 | int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, |
| 618 | BN_CTX *ctx); | 558 | BN_CTX *ctx); |
| 619 | #else | ||
| 620 | #define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\ | ||
| 621 | (r),(a),&((mont)->RR),(mont),(ctx)) | ||
| 622 | #endif | ||
| 623 | int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, | 559 | int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, |
| 624 | BN_MONT_CTX *mont, BN_CTX *ctx); | 560 | BN_MONT_CTX *mont, BN_CTX *ctx); |
| 625 | void BN_MONT_CTX_free(BN_MONT_CTX *mont); | 561 | void BN_MONT_CTX_free(BN_MONT_CTX *mont); |
diff --git a/src/lib/libcrypto/dh/dh.h b/src/lib/libcrypto/dh/dh.h index 21e840efc4..4545035afb 100644 --- a/src/lib/libcrypto/dh/dh.h +++ b/src/lib/libcrypto/dh/dh.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dh.h,v 1.30 2022/01/10 12:00:52 tb Exp $ */ | 1 | /* $OpenBSD: dh.h,v 1.31 2022/01/14 07:49:49 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 | * |
| @@ -199,19 +199,15 @@ void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, | |||
| 199 | int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); | 199 | int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); |
| 200 | void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); | 200 | void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key); |
| 201 | int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); | 201 | int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); |
| 202 | #if defined(LIBRESSL_OPAQUE_DH) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 203 | const BIGNUM *DH_get0_p(const DH *dh); | 202 | const BIGNUM *DH_get0_p(const DH *dh); |
| 204 | const BIGNUM *DH_get0_q(const DH *dh); | 203 | const BIGNUM *DH_get0_q(const DH *dh); |
| 205 | const BIGNUM *DH_get0_g(const DH *dh); | 204 | const BIGNUM *DH_get0_g(const DH *dh); |
| 206 | const BIGNUM *DH_get0_priv_key(const DH *dh); | 205 | const BIGNUM *DH_get0_priv_key(const DH *dh); |
| 207 | const BIGNUM *DH_get0_pub_key(const DH *dh); | 206 | const BIGNUM *DH_get0_pub_key(const DH *dh); |
| 208 | #endif | ||
| 209 | void DH_clear_flags(DH *dh, int flags); | 207 | void DH_clear_flags(DH *dh, int flags); |
| 210 | int DH_test_flags(const DH *dh, int flags); | 208 | int DH_test_flags(const DH *dh, int flags); |
| 211 | void DH_set_flags(DH *dh, int flags); | 209 | void DH_set_flags(DH *dh, int flags); |
| 212 | #if defined(LIBRESSL_OPAQUE_DH) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 213 | long DH_get_length(const DH *dh); | 210 | long DH_get_length(const DH *dh); |
| 214 | #endif | ||
| 215 | int DH_set_length(DH *dh, long length); | 211 | int DH_set_length(DH *dh, long length); |
| 216 | 212 | ||
| 217 | /* Deprecated version */ | 213 | /* Deprecated version */ |
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h index 7a5c2cd1c0..b0220856cc 100644 --- a/src/lib/libcrypto/dsa/dsa.h +++ b/src/lib/libcrypto/dsa/dsa.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: dsa.h,v 1.33 2022/01/05 20:52:14 tb Exp $ */ | 1 | /* $OpenBSD: dsa.h,v 1.34 2022/01/14 07:49:49 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 | * |
| @@ -202,9 +202,7 @@ void DSA_free(DSA *r); | |||
| 202 | /* "up" the DSA object's reference count */ | 202 | /* "up" the DSA object's reference count */ |
| 203 | int DSA_up_ref(DSA *r); | 203 | int DSA_up_ref(DSA *r); |
| 204 | int DSA_size(const DSA *); | 204 | int DSA_size(const DSA *); |
| 205 | #if defined(LIBRESSL_OPAQUE_DSA) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 206 | int DSA_bits(const DSA *d); | 205 | int DSA_bits(const DSA *d); |
| 207 | #endif | ||
| 208 | /* next 4 return -1 on error */ | 206 | /* next 4 return -1 on error */ |
| 209 | int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); | 207 | int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); |
| 210 | int DSA_sign(int type,const unsigned char *dgst,int dlen, | 208 | 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, | |||
| 270 | int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); | 268 | int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); |
| 271 | void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); | 269 | void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); |
| 272 | int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); | 270 | int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); |
| 273 | #if defined(LIBRESSL_OPAQUE_DSA) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 274 | const BIGNUM *DSA_get0_p(const DSA *d); | 271 | const BIGNUM *DSA_get0_p(const DSA *d); |
| 275 | const BIGNUM *DSA_get0_q(const DSA *d); | 272 | const BIGNUM *DSA_get0_q(const DSA *d); |
| 276 | const BIGNUM *DSA_get0_g(const DSA *d); | 273 | const BIGNUM *DSA_get0_g(const DSA *d); |
| 277 | const BIGNUM *DSA_get0_pub_key(const DSA *d); | 274 | const BIGNUM *DSA_get0_pub_key(const DSA *d); |
| 278 | const BIGNUM *DSA_get0_priv_key(const DSA *d); | 275 | const BIGNUM *DSA_get0_priv_key(const DSA *d); |
| 279 | #endif | ||
| 280 | void DSA_clear_flags(DSA *d, int flags); | 276 | void DSA_clear_flags(DSA *d, int flags); |
| 281 | int DSA_test_flags(const DSA *d, int flags); | 277 | int DSA_test_flags(const DSA *d, int flags); |
| 282 | void DSA_set_flags(DSA *d, int flags); | 278 | void DSA_set_flags(DSA *d, int flags); |
diff --git a/src/lib/libcrypto/ecdsa/ecdsa.h b/src/lib/libcrypto/ecdsa/ecdsa.h index 7b0a25468a..7b57f534ef 100644 --- a/src/lib/libcrypto/ecdsa/ecdsa.h +++ b/src/lib/libcrypto/ecdsa/ecdsa.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecdsa.h,v 1.9 2022/01/05 20:39:04 tb Exp $ */ | 1 | /* $OpenBSD: ecdsa.h,v 1.10 2022/01/14 07:49:49 tb Exp $ */ |
| 2 | /** | 2 | /** |
| 3 | * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions | 3 | * \file crypto/ecdsa/ecdsa.h Include file for the OpenSSL ECDSA functions |
| 4 | * \author Written by Nils Larsch for the OpenSSL project | 4 | * \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); | |||
| 140 | */ | 140 | */ |
| 141 | void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); | 141 | void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); |
| 142 | 142 | ||
| 143 | #if defined(LIBRESSL_OPAQUE_ECDSA) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 144 | const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig); | 143 | const BIGNUM *ECDSA_SIG_get0_r(const ECDSA_SIG *sig); |
| 145 | const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig); | 144 | const BIGNUM *ECDSA_SIG_get0_s(const ECDSA_SIG *sig); |
| 146 | #endif | ||
| 147 | 145 | ||
| 148 | /** Setter for r and s fields of ECDSA_SIG | 146 | /** Setter for r and s fields of ECDSA_SIG |
| 149 | * \param sig pointer to ECDSA_SIG pointer | 147 | * \param sig pointer to ECDSA_SIG pointer |
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index df71b0ac16..012b06befc 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.96 2022/01/12 08:52:25 tb Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.97 2022/01/14 07:49:49 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 | * |
| @@ -495,7 +495,6 @@ int EVP_MD_size(const EVP_MD *md); | |||
| 495 | int EVP_MD_block_size(const EVP_MD *md); | 495 | int EVP_MD_block_size(const EVP_MD *md); |
| 496 | unsigned long EVP_MD_flags(const EVP_MD *md); | 496 | unsigned long EVP_MD_flags(const EVP_MD *md); |
| 497 | 497 | ||
| 498 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 499 | EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); | 498 | EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); |
| 500 | void EVP_MD_meth_free(EVP_MD *md); | 499 | void EVP_MD_meth_free(EVP_MD *md); |
| 501 | EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); | 500 | EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); |
| @@ -513,14 +512,11 @@ int EVP_MD_meth_set_copy(EVP_MD *md, | |||
| 513 | int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx)); | 512 | int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx)); |
| 514 | int EVP_MD_meth_set_ctrl(EVP_MD *md, | 513 | int EVP_MD_meth_set_ctrl(EVP_MD *md, |
| 515 | int (*ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)); | 514 | int (*ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)); |
| 516 | #endif | ||
| 517 | 515 | ||
| 518 | const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); | 516 | const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); |
| 519 | void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); | 517 | void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); |
| 520 | #if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) | ||
| 521 | EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx); | 518 | EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx); |
| 522 | void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); | 519 | void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); |
| 523 | #endif | ||
| 524 | #define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) | 520 | #define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) |
| 525 | #define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) | 521 | #define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) |
| 526 | #define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) | 522 | #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, | |||
| 546 | int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); | 542 | int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); |
| 547 | void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); | 543 | void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); |
| 548 | void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); | 544 | void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); |
| 549 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 550 | void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx); | 545 | void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx); |
| 551 | void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data); | 546 | void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data); |
| 552 | unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); | 547 | unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); |
| 553 | #endif | ||
| 554 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) | 548 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) |
| 555 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); | 549 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); |
| 556 | #define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) | 550 | #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, | |||
| 1107 | void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, | 1101 | void EVP_PKEY_asn1_set_ctrl(EVP_PKEY_ASN1_METHOD *ameth, |
| 1108 | int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2)); | 1102 | int (*pkey_ctrl)(EVP_PKEY *pkey, int op, long arg1, void *arg2)); |
| 1109 | 1103 | ||
| 1110 | #if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) | ||
| 1111 | void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, | 1104 | void EVP_PKEY_asn1_set_check(EVP_PKEY_ASN1_METHOD *ameth, |
| 1112 | int (*pkey_check)(const EVP_PKEY *pk)); | 1105 | int (*pkey_check)(const EVP_PKEY *pk)); |
| 1113 | void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, | 1106 | void EVP_PKEY_asn1_set_public_check(EVP_PKEY_ASN1_METHOD *ameth, |
| 1114 | int (*pkey_public_check)(const EVP_PKEY *pk)); | 1107 | int (*pkey_public_check)(const EVP_PKEY *pk)); |
| 1115 | void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, | 1108 | void EVP_PKEY_asn1_set_param_check(EVP_PKEY_ASN1_METHOD *ameth, |
| 1116 | int (*pkey_check)(const EVP_PKEY *pk)); | 1109 | int (*pkey_check)(const EVP_PKEY *pk)); |
| 1117 | #endif | ||
| 1118 | 1110 | ||
| 1119 | #define EVP_PKEY_OP_UNDEFINED 0 | 1111 | #define EVP_PKEY_OP_UNDEFINED 0 |
| 1120 | #define EVP_PKEY_OP_PARAMGEN (1<<1) | 1112 | #define EVP_PKEY_OP_PARAMGEN (1<<1) |
| @@ -1242,11 +1234,9 @@ int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx); | |||
| 1242 | int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); | 1234 | int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); |
| 1243 | int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); | 1235 | int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); |
| 1244 | int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); | 1236 | int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); |
| 1245 | #if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) | ||
| 1246 | int EVP_PKEY_check(EVP_PKEY_CTX *ctx); | 1237 | int EVP_PKEY_check(EVP_PKEY_CTX *ctx); |
| 1247 | int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx); | 1238 | int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx); |
| 1248 | int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); | 1239 | int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); |
| 1249 | #endif | ||
| 1250 | 1240 | ||
| 1251 | void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); | 1241 | void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); |
| 1252 | EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx); | 1242 | 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, | |||
| 1313 | int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2), | 1303 | int (*ctrl)(EVP_PKEY_CTX *ctx, int type, int p1, void *p2), |
| 1314 | int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value)); | 1304 | int (*ctrl_str)(EVP_PKEY_CTX *ctx, const char *type, const char *value)); |
| 1315 | 1305 | ||
| 1316 | #if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) | ||
| 1317 | void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, | 1306 | void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, |
| 1318 | int (*check)(EVP_PKEY *pkey)); | 1307 | int (*check)(EVP_PKEY *pkey)); |
| 1319 | void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, | 1308 | void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, |
| 1320 | int (*public_check)(EVP_PKEY *pkey)); | 1309 | int (*public_check)(EVP_PKEY *pkey)); |
| 1321 | void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, | 1310 | void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, |
| 1322 | int (*param_check)(EVP_PKEY *pkey)); | 1311 | int (*param_check)(EVP_PKEY *pkey)); |
| 1323 | #endif | ||
| 1324 | 1312 | ||
| 1325 | /* Authenticated Encryption with Additional Data. | 1313 | /* Authenticated Encryption with Additional Data. |
| 1326 | * | 1314 | * |
| @@ -1378,7 +1366,6 @@ typedef struct evp_aead_ctx_st { | |||
| 1378 | * should be used. */ | 1366 | * should be used. */ |
| 1379 | #define EVP_AEAD_DEFAULT_TAG_LENGTH 0 | 1367 | #define EVP_AEAD_DEFAULT_TAG_LENGTH 0 |
| 1380 | 1368 | ||
| 1381 | #if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) | ||
| 1382 | /* EVP_AEAD_CTX_new allocates a new context for use with EVP_AEAD_CTX_init. | 1369 | /* EVP_AEAD_CTX_new allocates a new context for use with EVP_AEAD_CTX_init. |
| 1383 | * It can be cleaned up for reuse with EVP_AEAD_CTX_cleanup and must be freed | 1370 | * It can be cleaned up for reuse with EVP_AEAD_CTX_cleanup and must be freed |
| 1384 | * with EVP_AEAD_CTX_free. */ | 1371 | * with EVP_AEAD_CTX_free. */ |
| @@ -1386,7 +1373,6 @@ EVP_AEAD_CTX *EVP_AEAD_CTX_new(void); | |||
| 1386 | 1373 | ||
| 1387 | /* EVP_AEAD_CTX_free releases all memory owned by the context. */ | 1374 | /* EVP_AEAD_CTX_free releases all memory owned by the context. */ |
| 1388 | void EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx); | 1375 | void EVP_AEAD_CTX_free(EVP_AEAD_CTX *ctx); |
| 1389 | #endif | ||
| 1390 | 1376 | ||
| 1391 | /* EVP_AEAD_CTX_init initializes the context for the given AEAD algorithm. | 1377 | /* EVP_AEAD_CTX_init initializes the context for the given AEAD algorithm. |
| 1392 | * The implementation argument may be NULL to choose the default implementation. | 1378 | * The implementation argument may be NULL to choose the default implementation. |
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h index 2aaaefd96b..3ed792bb34 100644 --- a/src/lib/libcrypto/objects/objects.h +++ b/src/lib/libcrypto/objects/objects.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: objects.h,v 1.14 2022/01/08 21:36:39 tb Exp $ */ | 1 | /* $OpenBSD: objects.h,v 1.15 2022/01/14 07:49:49 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 | * |
| @@ -1105,10 +1105,8 @@ int OBJ_create(const char *oid, const char *sn, const char *ln); | |||
| 1105 | void OBJ_cleanup(void); | 1105 | void OBJ_cleanup(void); |
| 1106 | int OBJ_create_objects(BIO *in); | 1106 | int OBJ_create_objects(BIO *in); |
| 1107 | 1107 | ||
| 1108 | #if defined(LIBRESSL_CRYPTO_INTERNAL) || defined(LIBRESSL_NEXT_API) | ||
| 1109 | size_t OBJ_length(const ASN1_OBJECT *obj); | 1108 | size_t OBJ_length(const ASN1_OBJECT *obj); |
| 1110 | const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj); | 1109 | const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj); |
| 1111 | #endif | ||
| 1112 | 1110 | ||
| 1113 | int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); | 1111 | int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid); |
| 1114 | int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); | 1112 | int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid); |
diff --git a/src/lib/libcrypto/pem/pem.h b/src/lib/libcrypto/pem/pem.h index b447dc4ac2..0ea04bece7 100644 --- a/src/lib/libcrypto/pem/pem.h +++ b/src/lib/libcrypto/pem/pem.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: pem.h,v 1.21 2021/12/24 12:59:17 tb Exp $ */ | 1 | /* $OpenBSD: pem.h,v 1.22 2022/01/14 07:49:49 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -482,11 +482,9 @@ DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) | |||
| 482 | 482 | ||
| 483 | DECLARE_PEM_rw(PUBKEY, EVP_PKEY) | 483 | DECLARE_PEM_rw(PUBKEY, EVP_PKEY) |
| 484 | 484 | ||
| 485 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 486 | int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, | 485 | int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, |
| 487 | const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, | 486 | const EVP_CIPHER *enc, unsigned char *kstr, int klen, pem_password_cb *cb, |
| 488 | void *u); | 487 | void *u); |
| 489 | #endif | ||
| 490 | int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, | 488 | int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, |
| 491 | char *kstr, int klen, | 489 | char *kstr, int klen, |
| 492 | pem_password_cb *cb, void *u); | 490 | pem_password_cb *cb, void *u); |
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h index 9dea6c37c0..daefcb85b2 100644 --- a/src/lib/libcrypto/rsa/rsa.h +++ b/src/lib/libcrypto/rsa/rsa.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa.h,v 1.52 2022/01/05 20:44:12 tb Exp $ */ | 1 | /* $OpenBSD: rsa.h,v 1.53 2022/01/14 07:49:49 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 | * |
| @@ -470,7 +470,6 @@ void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, | |||
| 470 | int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); | 470 | int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); |
| 471 | void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); | 471 | void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); |
| 472 | int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); | 472 | int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); |
| 473 | #if defined(LIBRESSL_OPAQUE_RSA) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 474 | const BIGNUM *RSA_get0_n(const RSA *r); | 473 | const BIGNUM *RSA_get0_n(const RSA *r); |
| 475 | const BIGNUM *RSA_get0_e(const RSA *r); | 474 | const BIGNUM *RSA_get0_e(const RSA *r); |
| 476 | const BIGNUM *RSA_get0_d(const RSA *r); | 475 | const BIGNUM *RSA_get0_d(const RSA *r); |
| @@ -480,7 +479,6 @@ const BIGNUM *RSA_get0_dmp1(const RSA *r); | |||
| 480 | const BIGNUM *RSA_get0_dmq1(const RSA *r); | 479 | const BIGNUM *RSA_get0_dmq1(const RSA *r); |
| 481 | const BIGNUM *RSA_get0_iqmp(const RSA *r); | 480 | const BIGNUM *RSA_get0_iqmp(const RSA *r); |
| 482 | const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r); | 481 | const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r); |
| 483 | #endif | ||
| 484 | void RSA_clear_flags(RSA *r, int flags); | 482 | void RSA_clear_flags(RSA *r, int flags); |
| 485 | int RSA_test_flags(const RSA *r, int flags); | 483 | int RSA_test_flags(const RSA *r, int flags); |
| 486 | void RSA_set_flags(RSA *r, int flags); | 484 | void RSA_set_flags(RSA *r, int flags); |
diff --git a/src/lib/libcrypto/x509/x509_vfy.h b/src/lib/libcrypto/x509/x509_vfy.h index a02ef94e2b..c50624a603 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.48 2022/01/05 20:18:19 tb Exp $ */ | 1 | /* $OpenBSD: x509_vfy.h,v 1.49 2022/01/14 07:49:49 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 | * |
| @@ -297,11 +297,9 @@ int X509_STORE_set_trust(X509_STORE *ctx, int trust); | |||
| 297 | int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm); | 297 | int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm); |
| 298 | X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); | 298 | X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx); |
| 299 | 299 | ||
| 300 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 301 | typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *); | 300 | typedef int (*X509_STORE_CTX_verify_cb)(int, X509_STORE_CTX *); |
| 302 | 301 | ||
| 303 | X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE *); | 302 | X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE *); |
| 304 | #endif | ||
| 305 | 303 | ||
| 306 | void X509_STORE_set_verify_cb(X509_STORE *ctx, | 304 | void X509_STORE_set_verify_cb(X509_STORE *ctx, |
| 307 | int (*verify_cb)(int, X509_STORE_CTX *)); | 305 | 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 *); | |||
| 398 | void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, | 396 | void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx, |
| 399 | int (*verify_cb)(int, X509_STORE_CTX *)); | 397 | int (*verify_cb)(int, X509_STORE_CTX *)); |
| 400 | 398 | ||
| 401 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 402 | typedef int (*X509_STORE_CTX_verify_fn)(X509_STORE_CTX *); | 399 | typedef int (*X509_STORE_CTX_verify_fn)(X509_STORE_CTX *); |
| 403 | 400 | ||
| 404 | void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify); | 401 | void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify); |
| 405 | X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx); | 402 | X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx); |
| 406 | #endif | ||
| 407 | #define X509_STORE_set_verify_func(ctx, func) \ | 403 | #define X509_STORE_set_verify_func(ctx, func) \ |
| 408 | X509_STORE_set_verify((ctx), (func)) | 404 | X509_STORE_set_verify((ctx), (func)) |
| 409 | 405 | ||
