diff options
Diffstat (limited to 'src/lib/libssl/ssl_rsa.c')
-rw-r--r-- | src/lib/libssl/ssl_rsa.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_rsa.c b/src/lib/libssl/ssl_rsa.c index f84315ba3e..68137bc5fb 100644 --- a/src/lib/libssl/ssl_rsa.c +++ b/src/lib/libssl/ssl_rsa.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_rsa.c,v 1.49 2022/11/26 16:08:56 tb Exp $ */ | 1 | /* $OpenBSD: ssl_rsa.c,v 1.50 2023/07/08 16:40:13 beck 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 | * |
@@ -83,6 +83,7 @@ SSL_use_certificate(SSL *ssl, X509 *x) | |||
83 | } | 83 | } |
84 | return ssl_set_cert(NULL, ssl, x); | 84 | return ssl_set_cert(NULL, ssl, x); |
85 | } | 85 | } |
86 | LSSL_ALIAS(SSL_use_certificate); | ||
86 | 87 | ||
87 | int | 88 | int |
88 | SSL_use_certificate_file(SSL *ssl, const char *file, int type) | 89 | SSL_use_certificate_file(SSL *ssl, const char *file, int type) |
@@ -126,6 +127,7 @@ SSL_use_certificate_file(SSL *ssl, const char *file, int type) | |||
126 | BIO_free(in); | 127 | BIO_free(in); |
127 | return (ret); | 128 | return (ret); |
128 | } | 129 | } |
130 | LSSL_ALIAS(SSL_use_certificate_file); | ||
129 | 131 | ||
130 | int | 132 | int |
131 | SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len) | 133 | SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len) |
@@ -143,6 +145,7 @@ SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len) | |||
143 | X509_free(x); | 145 | X509_free(x); |
144 | return (ret); | 146 | return (ret); |
145 | } | 147 | } |
148 | LSSL_ALIAS(SSL_use_certificate_ASN1); | ||
146 | 149 | ||
147 | int | 150 | int |
148 | SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) | 151 | SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) |
@@ -166,6 +169,7 @@ SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) | |||
166 | EVP_PKEY_free(pkey); | 169 | EVP_PKEY_free(pkey); |
167 | return (ret); | 170 | return (ret); |
168 | } | 171 | } |
172 | LSSL_ALIAS(SSL_use_RSAPrivateKey); | ||
169 | 173 | ||
170 | static int | 174 | static int |
171 | ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey) | 175 | ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey) |
@@ -259,6 +263,7 @@ SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type) | |||
259 | BIO_free(in); | 263 | BIO_free(in); |
260 | return (ret); | 264 | return (ret); |
261 | } | 265 | } |
266 | LSSL_ALIAS(SSL_use_RSAPrivateKey_file); | ||
262 | 267 | ||
263 | int | 268 | int |
264 | SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len) | 269 | SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len) |
@@ -275,6 +280,7 @@ SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len) | |||
275 | RSA_free(rsa); | 280 | RSA_free(rsa); |
276 | return (ret); | 281 | return (ret); |
277 | } | 282 | } |
283 | LSSL_ALIAS(SSL_use_RSAPrivateKey_ASN1); | ||
278 | 284 | ||
279 | int | 285 | int |
280 | SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) | 286 | SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) |
@@ -288,6 +294,7 @@ SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) | |||
288 | ret = ssl_set_pkey(NULL, ssl, pkey); | 294 | ret = ssl_set_pkey(NULL, ssl, pkey); |
289 | return (ret); | 295 | return (ret); |
290 | } | 296 | } |
297 | LSSL_ALIAS(SSL_use_PrivateKey); | ||
291 | 298 | ||
292 | int | 299 | int |
293 | SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) | 300 | SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) |
@@ -328,6 +335,7 @@ SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) | |||
328 | BIO_free(in); | 335 | BIO_free(in); |
329 | return (ret); | 336 | return (ret); |
330 | } | 337 | } |
338 | LSSL_ALIAS(SSL_use_PrivateKey_file); | ||
331 | 339 | ||
332 | int | 340 | int |
333 | SSL_use_PrivateKey_ASN1(int type, SSL *ssl, const unsigned char *d, long len) | 341 | SSL_use_PrivateKey_ASN1(int type, SSL *ssl, const unsigned char *d, long len) |
@@ -344,6 +352,7 @@ SSL_use_PrivateKey_ASN1(int type, SSL *ssl, const unsigned char *d, long len) | |||
344 | EVP_PKEY_free(pkey); | 352 | EVP_PKEY_free(pkey); |
345 | return (ret); | 353 | return (ret); |
346 | } | 354 | } |
355 | LSSL_ALIAS(SSL_use_PrivateKey_ASN1); | ||
347 | 356 | ||
348 | int | 357 | int |
349 | SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) | 358 | SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) |
@@ -354,6 +363,7 @@ SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) | |||
354 | } | 363 | } |
355 | return ssl_set_cert(ctx, NULL, x); | 364 | return ssl_set_cert(ctx, NULL, x); |
356 | } | 365 | } |
366 | LSSL_ALIAS(SSL_CTX_use_certificate); | ||
357 | 367 | ||
358 | static int | 368 | static int |
359 | ssl_get_password_cb_and_arg(SSL_CTX *ctx, SSL *ssl, | 369 | ssl_get_password_cb_and_arg(SSL_CTX *ctx, SSL *ssl, |
@@ -475,6 +485,7 @@ SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type) | |||
475 | BIO_free(in); | 485 | BIO_free(in); |
476 | return (ret); | 486 | return (ret); |
477 | } | 487 | } |
488 | LSSL_ALIAS(SSL_CTX_use_certificate_file); | ||
478 | 489 | ||
479 | int | 490 | int |
480 | SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d) | 491 | SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d) |
@@ -492,6 +503,7 @@ SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d) | |||
492 | X509_free(x); | 503 | X509_free(x); |
493 | return (ret); | 504 | return (ret); |
494 | } | 505 | } |
506 | LSSL_ALIAS(SSL_CTX_use_certificate_ASN1); | ||
495 | 507 | ||
496 | int | 508 | int |
497 | SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) | 509 | SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) |
@@ -515,6 +527,7 @@ SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) | |||
515 | EVP_PKEY_free(pkey); | 527 | EVP_PKEY_free(pkey); |
516 | return (ret); | 528 | return (ret); |
517 | } | 529 | } |
530 | LSSL_ALIAS(SSL_CTX_use_RSAPrivateKey); | ||
518 | 531 | ||
519 | int | 532 | int |
520 | SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type) | 533 | SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type) |
@@ -555,6 +568,7 @@ SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type) | |||
555 | BIO_free(in); | 568 | BIO_free(in); |
556 | return (ret); | 569 | return (ret); |
557 | } | 570 | } |
571 | LSSL_ALIAS(SSL_CTX_use_RSAPrivateKey_file); | ||
558 | 572 | ||
559 | int | 573 | int |
560 | SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len) | 574 | SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len) |
@@ -571,6 +585,7 @@ SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len) | |||
571 | RSA_free(rsa); | 585 | RSA_free(rsa); |
572 | return (ret); | 586 | return (ret); |
573 | } | 587 | } |
588 | LSSL_ALIAS(SSL_CTX_use_RSAPrivateKey_ASN1); | ||
574 | 589 | ||
575 | int | 590 | int |
576 | SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) | 591 | SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) |
@@ -581,6 +596,7 @@ SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) | |||
581 | } | 596 | } |
582 | return ssl_set_pkey(ctx, NULL, pkey); | 597 | return ssl_set_pkey(ctx, NULL, pkey); |
583 | } | 598 | } |
599 | LSSL_ALIAS(SSL_CTX_use_PrivateKey); | ||
584 | 600 | ||
585 | int | 601 | int |
586 | SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) | 602 | SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) |
@@ -621,6 +637,7 @@ SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) | |||
621 | BIO_free(in); | 637 | BIO_free(in); |
622 | return (ret); | 638 | return (ret); |
623 | } | 639 | } |
640 | LSSL_ALIAS(SSL_CTX_use_PrivateKey_file); | ||
624 | 641 | ||
625 | int | 642 | int |
626 | SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, const unsigned char *d, | 643 | SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, const unsigned char *d, |
@@ -638,6 +655,7 @@ SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, const unsigned char *d, | |||
638 | EVP_PKEY_free(pkey); | 655 | EVP_PKEY_free(pkey); |
639 | return (ret); | 656 | return (ret); |
640 | } | 657 | } |
658 | LSSL_ALIAS(SSL_CTX_use_PrivateKey_ASN1); | ||
641 | 659 | ||
642 | 660 | ||
643 | /* | 661 | /* |
@@ -721,12 +739,14 @@ SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file) | |||
721 | { | 739 | { |
722 | return ssl_use_certificate_chain_file(ctx, NULL, file); | 740 | return ssl_use_certificate_chain_file(ctx, NULL, file); |
723 | } | 741 | } |
742 | LSSL_ALIAS(SSL_CTX_use_certificate_chain_file); | ||
724 | 743 | ||
725 | int | 744 | int |
726 | SSL_use_certificate_chain_file(SSL *ssl, const char *file) | 745 | SSL_use_certificate_chain_file(SSL *ssl, const char *file) |
727 | { | 746 | { |
728 | return ssl_use_certificate_chain_file(NULL, ssl, file); | 747 | return ssl_use_certificate_chain_file(NULL, ssl, file); |
729 | } | 748 | } |
749 | LSSL_ALIAS(SSL_use_certificate_chain_file); | ||
730 | 750 | ||
731 | int | 751 | int |
732 | SSL_CTX_use_certificate_chain_mem(SSL_CTX *ctx, void *buf, int len) | 752 | SSL_CTX_use_certificate_chain_mem(SSL_CTX *ctx, void *buf, int len) |
@@ -746,3 +766,4 @@ SSL_CTX_use_certificate_chain_mem(SSL_CTX *ctx, void *buf, int len) | |||
746 | BIO_free(in); | 766 | BIO_free(in); |
747 | return (ret); | 767 | return (ret); |
748 | } | 768 | } |
769 | LSSL_ALIAS(SSL_CTX_use_certificate_chain_mem); | ||