summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_rsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/ssl_rsa.c')
-rw-r--r--src/lib/libssl/ssl_rsa.c23
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}
86LSSL_ALIAS(SSL_use_certificate);
86 87
87int 88int
88SSL_use_certificate_file(SSL *ssl, const char *file, int type) 89SSL_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}
130LSSL_ALIAS(SSL_use_certificate_file);
129 131
130int 132int
131SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len) 133SSL_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}
148LSSL_ALIAS(SSL_use_certificate_ASN1);
146 149
147int 150int
148SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) 151SSL_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}
172LSSL_ALIAS(SSL_use_RSAPrivateKey);
169 173
170static int 174static int
171ssl_set_pkey(SSL_CTX *ctx, SSL *ssl, EVP_PKEY *pkey) 175ssl_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}
266LSSL_ALIAS(SSL_use_RSAPrivateKey_file);
262 267
263int 268int
264SSL_use_RSAPrivateKey_ASN1(SSL *ssl, const unsigned char *d, long len) 269SSL_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}
283LSSL_ALIAS(SSL_use_RSAPrivateKey_ASN1);
278 284
279int 285int
280SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey) 286SSL_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}
297LSSL_ALIAS(SSL_use_PrivateKey);
291 298
292int 299int
293SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) 300SSL_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}
338LSSL_ALIAS(SSL_use_PrivateKey_file);
331 339
332int 340int
333SSL_use_PrivateKey_ASN1(int type, SSL *ssl, const unsigned char *d, long len) 341SSL_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}
355LSSL_ALIAS(SSL_use_PrivateKey_ASN1);
347 356
348int 357int
349SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x) 358SSL_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}
366LSSL_ALIAS(SSL_CTX_use_certificate);
357 367
358static int 368static int
359ssl_get_password_cb_and_arg(SSL_CTX *ctx, SSL *ssl, 369ssl_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}
488LSSL_ALIAS(SSL_CTX_use_certificate_file);
478 489
479int 490int
480SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d) 491SSL_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}
506LSSL_ALIAS(SSL_CTX_use_certificate_ASN1);
495 507
496int 508int
497SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) 509SSL_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}
530LSSL_ALIAS(SSL_CTX_use_RSAPrivateKey);
518 531
519int 532int
520SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type) 533SSL_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}
571LSSL_ALIAS(SSL_CTX_use_RSAPrivateKey_file);
558 572
559int 573int
560SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len) 574SSL_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}
588LSSL_ALIAS(SSL_CTX_use_RSAPrivateKey_ASN1);
574 589
575int 590int
576SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey) 591SSL_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}
599LSSL_ALIAS(SSL_CTX_use_PrivateKey);
584 600
585int 601int
586SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type) 602SSL_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}
640LSSL_ALIAS(SSL_CTX_use_PrivateKey_file);
624 641
625int 642int
626SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, const unsigned char *d, 643SSL_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}
658LSSL_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}
742LSSL_ALIAS(SSL_CTX_use_certificate_chain_file);
724 743
725int 744int
726SSL_use_certificate_chain_file(SSL *ssl, const char *file) 745SSL_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}
749LSSL_ALIAS(SSL_use_certificate_chain_file);
730 750
731int 751int
732SSL_CTX_use_certificate_chain_mem(SSL_CTX *ctx, void *buf, int len) 752SSL_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}
769LSSL_ALIAS(SSL_CTX_use_certificate_chain_mem);