diff options
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 197 |
1 files changed, 196 insertions, 1 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index f6c9406139..b1169b0242 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.310 2023/05/26 13:44:05 tb Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.311 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 | * |
@@ -218,6 +218,7 @@ SSL_clear(SSL *s) | |||
218 | 218 | ||
219 | return (1); | 219 | return (1); |
220 | } | 220 | } |
221 | LSSL_ALIAS(SSL_clear); | ||
221 | 222 | ||
222 | /* Used to change an SSL_CTXs default SSL method type */ | 223 | /* Used to change an SSL_CTXs default SSL method type */ |
223 | int | 224 | int |
@@ -236,6 +237,7 @@ SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth) | |||
236 | } | 237 | } |
237 | return (1); | 238 | return (1); |
238 | } | 239 | } |
240 | LSSL_ALIAS(SSL_CTX_set_ssl_version); | ||
239 | 241 | ||
240 | SSL * | 242 | SSL * |
241 | SSL_new(SSL_CTX *ctx) | 243 | SSL_new(SSL_CTX *ctx) |
@@ -360,6 +362,7 @@ SSL_new(SSL_CTX *ctx) | |||
360 | SSLerrorx(ERR_R_MALLOC_FAILURE); | 362 | SSLerrorx(ERR_R_MALLOC_FAILURE); |
361 | return (NULL); | 363 | return (NULL); |
362 | } | 364 | } |
365 | LSSL_ALIAS(SSL_new); | ||
363 | 366 | ||
364 | int | 367 | int |
365 | SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, | 368 | SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, |
@@ -374,6 +377,7 @@ SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx, | |||
374 | 377 | ||
375 | return (1); | 378 | return (1); |
376 | } | 379 | } |
380 | LSSL_ALIAS(SSL_CTX_set_session_id_context); | ||
377 | 381 | ||
378 | int | 382 | int |
379 | SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, | 383 | SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, |
@@ -388,6 +392,7 @@ SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx, | |||
388 | 392 | ||
389 | return (1); | 393 | return (1); |
390 | } | 394 | } |
395 | LSSL_ALIAS(SSL_set_session_id_context); | ||
391 | 396 | ||
392 | int | 397 | int |
393 | SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb) | 398 | SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb) |
@@ -397,6 +402,7 @@ SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb) | |||
397 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); | 402 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); |
398 | return (1); | 403 | return (1); |
399 | } | 404 | } |
405 | LSSL_ALIAS(SSL_CTX_set_generate_session_id); | ||
400 | 406 | ||
401 | int | 407 | int |
402 | SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb) | 408 | SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb) |
@@ -406,6 +412,7 @@ SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb) | |||
406 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL); | 412 | CRYPTO_w_unlock(CRYPTO_LOCK_SSL); |
407 | return (1); | 413 | return (1); |
408 | } | 414 | } |
415 | LSSL_ALIAS(SSL_set_generate_session_id); | ||
409 | 416 | ||
410 | int | 417 | int |
411 | SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, | 418 | SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, |
@@ -432,30 +439,35 @@ SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, | |||
432 | CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX); | 439 | CRYPTO_r_unlock(CRYPTO_LOCK_SSL_CTX); |
433 | return (p != NULL); | 440 | return (p != NULL); |
434 | } | 441 | } |
442 | LSSL_ALIAS(SSL_has_matching_session_id); | ||
435 | 443 | ||
436 | int | 444 | int |
437 | SSL_CTX_set_purpose(SSL_CTX *s, int purpose) | 445 | SSL_CTX_set_purpose(SSL_CTX *s, int purpose) |
438 | { | 446 | { |
439 | return (X509_VERIFY_PARAM_set_purpose(s->param, purpose)); | 447 | return (X509_VERIFY_PARAM_set_purpose(s->param, purpose)); |
440 | } | 448 | } |
449 | LSSL_ALIAS(SSL_CTX_set_purpose); | ||
441 | 450 | ||
442 | int | 451 | int |
443 | SSL_set_purpose(SSL *s, int purpose) | 452 | SSL_set_purpose(SSL *s, int purpose) |
444 | { | 453 | { |
445 | return (X509_VERIFY_PARAM_set_purpose(s->param, purpose)); | 454 | return (X509_VERIFY_PARAM_set_purpose(s->param, purpose)); |
446 | } | 455 | } |
456 | LSSL_ALIAS(SSL_set_purpose); | ||
447 | 457 | ||
448 | int | 458 | int |
449 | SSL_CTX_set_trust(SSL_CTX *s, int trust) | 459 | SSL_CTX_set_trust(SSL_CTX *s, int trust) |
450 | { | 460 | { |
451 | return (X509_VERIFY_PARAM_set_trust(s->param, trust)); | 461 | return (X509_VERIFY_PARAM_set_trust(s->param, trust)); |
452 | } | 462 | } |
463 | LSSL_ALIAS(SSL_CTX_set_trust); | ||
453 | 464 | ||
454 | int | 465 | int |
455 | SSL_set_trust(SSL *s, int trust) | 466 | SSL_set_trust(SSL *s, int trust) |
456 | { | 467 | { |
457 | return (X509_VERIFY_PARAM_set_trust(s->param, trust)); | 468 | return (X509_VERIFY_PARAM_set_trust(s->param, trust)); |
458 | } | 469 | } |
470 | LSSL_ALIAS(SSL_set_trust); | ||
459 | 471 | ||
460 | int | 472 | int |
461 | SSL_set1_host(SSL *s, const char *hostname) | 473 | SSL_set1_host(SSL *s, const char *hostname) |
@@ -470,42 +482,49 @@ SSL_set1_host(SSL *s, const char *hostname) | |||
470 | else | 482 | else |
471 | return X509_VERIFY_PARAM_set1_host(s->param, hostname, 0); | 483 | return X509_VERIFY_PARAM_set1_host(s->param, hostname, 0); |
472 | } | 484 | } |
485 | LSSL_ALIAS(SSL_set1_host); | ||
473 | 486 | ||
474 | void | 487 | void |
475 | SSL_set_hostflags(SSL *s, unsigned int flags) | 488 | SSL_set_hostflags(SSL *s, unsigned int flags) |
476 | { | 489 | { |
477 | X509_VERIFY_PARAM_set_hostflags(s->param, flags); | 490 | X509_VERIFY_PARAM_set_hostflags(s->param, flags); |
478 | } | 491 | } |
492 | LSSL_ALIAS(SSL_set_hostflags); | ||
479 | 493 | ||
480 | const char * | 494 | const char * |
481 | SSL_get0_peername(SSL *s) | 495 | SSL_get0_peername(SSL *s) |
482 | { | 496 | { |
483 | return X509_VERIFY_PARAM_get0_peername(s->param); | 497 | return X509_VERIFY_PARAM_get0_peername(s->param); |
484 | } | 498 | } |
499 | LSSL_ALIAS(SSL_get0_peername); | ||
485 | 500 | ||
486 | X509_VERIFY_PARAM * | 501 | X509_VERIFY_PARAM * |
487 | SSL_CTX_get0_param(SSL_CTX *ctx) | 502 | SSL_CTX_get0_param(SSL_CTX *ctx) |
488 | { | 503 | { |
489 | return (ctx->param); | 504 | return (ctx->param); |
490 | } | 505 | } |
506 | LSSL_ALIAS(SSL_CTX_get0_param); | ||
491 | 507 | ||
492 | int | 508 | int |
493 | SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm) | 509 | SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm) |
494 | { | 510 | { |
495 | return (X509_VERIFY_PARAM_set1(ctx->param, vpm)); | 511 | return (X509_VERIFY_PARAM_set1(ctx->param, vpm)); |
496 | } | 512 | } |
513 | LSSL_ALIAS(SSL_CTX_set1_param); | ||
497 | 514 | ||
498 | X509_VERIFY_PARAM * | 515 | X509_VERIFY_PARAM * |
499 | SSL_get0_param(SSL *ssl) | 516 | SSL_get0_param(SSL *ssl) |
500 | { | 517 | { |
501 | return (ssl->param); | 518 | return (ssl->param); |
502 | } | 519 | } |
520 | LSSL_ALIAS(SSL_get0_param); | ||
503 | 521 | ||
504 | int | 522 | int |
505 | SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm) | 523 | SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm) |
506 | { | 524 | { |
507 | return (X509_VERIFY_PARAM_set1(ssl->param, vpm)); | 525 | return (X509_VERIFY_PARAM_set1(ssl->param, vpm)); |
508 | } | 526 | } |
527 | LSSL_ALIAS(SSL_set1_param); | ||
509 | 528 | ||
510 | void | 529 | void |
511 | SSL_free(SSL *s) | 530 | SSL_free(SSL *s) |
@@ -585,6 +604,7 @@ SSL_free(SSL *s) | |||
585 | 604 | ||
586 | free(s); | 605 | free(s); |
587 | } | 606 | } |
607 | LSSL_ALIAS(SSL_free); | ||
588 | 608 | ||
589 | int | 609 | int |
590 | SSL_up_ref(SSL *s) | 610 | SSL_up_ref(SSL *s) |
@@ -592,6 +612,7 @@ SSL_up_ref(SSL *s) | |||
592 | int refs = CRYPTO_add(&s->references, 1, CRYPTO_LOCK_SSL); | 612 | int refs = CRYPTO_add(&s->references, 1, CRYPTO_LOCK_SSL); |
593 | return (refs > 1) ? 1 : 0; | 613 | return (refs > 1) ? 1 : 0; |
594 | } | 614 | } |
615 | LSSL_ALIAS(SSL_up_ref); | ||
595 | 616 | ||
596 | void | 617 | void |
597 | SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) | 618 | SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) |
@@ -611,12 +632,14 @@ SSL_set_bio(SSL *s, BIO *rbio, BIO *wbio) | |||
611 | s->rbio = rbio; | 632 | s->rbio = rbio; |
612 | s->wbio = wbio; | 633 | s->wbio = wbio; |
613 | } | 634 | } |
635 | LSSL_ALIAS(SSL_set_bio); | ||
614 | 636 | ||
615 | BIO * | 637 | BIO * |
616 | SSL_get_rbio(const SSL *s) | 638 | SSL_get_rbio(const SSL *s) |
617 | { | 639 | { |
618 | return (s->rbio); | 640 | return (s->rbio); |
619 | } | 641 | } |
642 | LSSL_ALIAS(SSL_get_rbio); | ||
620 | 643 | ||
621 | void | 644 | void |
622 | SSL_set0_rbio(SSL *s, BIO *rbio) | 645 | SSL_set0_rbio(SSL *s, BIO *rbio) |
@@ -624,18 +647,21 @@ SSL_set0_rbio(SSL *s, BIO *rbio) | |||
624 | BIO_free_all(s->rbio); | 647 | BIO_free_all(s->rbio); |
625 | s->rbio = rbio; | 648 | s->rbio = rbio; |
626 | } | 649 | } |
650 | LSSL_ALIAS(SSL_set0_rbio); | ||
627 | 651 | ||
628 | BIO * | 652 | BIO * |
629 | SSL_get_wbio(const SSL *s) | 653 | SSL_get_wbio(const SSL *s) |
630 | { | 654 | { |
631 | return (s->wbio); | 655 | return (s->wbio); |
632 | } | 656 | } |
657 | LSSL_ALIAS(SSL_get_wbio); | ||
633 | 658 | ||
634 | int | 659 | int |
635 | SSL_get_fd(const SSL *s) | 660 | SSL_get_fd(const SSL *s) |
636 | { | 661 | { |
637 | return (SSL_get_rfd(s)); | 662 | return (SSL_get_rfd(s)); |
638 | } | 663 | } |
664 | LSSL_ALIAS(SSL_get_fd); | ||
639 | 665 | ||
640 | int | 666 | int |
641 | SSL_get_rfd(const SSL *s) | 667 | SSL_get_rfd(const SSL *s) |
@@ -649,6 +675,7 @@ SSL_get_rfd(const SSL *s) | |||
649 | BIO_get_fd(r, &ret); | 675 | BIO_get_fd(r, &ret); |
650 | return (ret); | 676 | return (ret); |
651 | } | 677 | } |
678 | LSSL_ALIAS(SSL_get_rfd); | ||
652 | 679 | ||
653 | int | 680 | int |
654 | SSL_get_wfd(const SSL *s) | 681 | SSL_get_wfd(const SSL *s) |
@@ -662,6 +689,7 @@ SSL_get_wfd(const SSL *s) | |||
662 | BIO_get_fd(r, &ret); | 689 | BIO_get_fd(r, &ret); |
663 | return (ret); | 690 | return (ret); |
664 | } | 691 | } |
692 | LSSL_ALIAS(SSL_get_wfd); | ||
665 | 693 | ||
666 | int | 694 | int |
667 | SSL_set_fd(SSL *s, int fd) | 695 | SSL_set_fd(SSL *s, int fd) |
@@ -681,6 +709,7 @@ SSL_set_fd(SSL *s, int fd) | |||
681 | err: | 709 | err: |
682 | return (ret); | 710 | return (ret); |
683 | } | 711 | } |
712 | LSSL_ALIAS(SSL_set_fd); | ||
684 | 713 | ||
685 | int | 714 | int |
686 | SSL_set_wfd(SSL *s, int fd) | 715 | SSL_set_wfd(SSL *s, int fd) |
@@ -704,6 +733,7 @@ SSL_set_wfd(SSL *s, int fd) | |||
704 | err: | 733 | err: |
705 | return (ret); | 734 | return (ret); |
706 | } | 735 | } |
736 | LSSL_ALIAS(SSL_set_wfd); | ||
707 | 737 | ||
708 | int | 738 | int |
709 | SSL_set_rfd(SSL *s, int fd) | 739 | SSL_set_rfd(SSL *s, int fd) |
@@ -727,6 +757,7 @@ SSL_set_rfd(SSL *s, int fd) | |||
727 | err: | 757 | err: |
728 | return (ret); | 758 | return (ret); |
729 | } | 759 | } |
760 | LSSL_ALIAS(SSL_set_rfd); | ||
730 | 761 | ||
731 | 762 | ||
732 | /* return length of latest Finished message we sent, copy to 'buf' */ | 763 | /* return length of latest Finished message we sent, copy to 'buf' */ |
@@ -741,6 +772,7 @@ SSL_get_finished(const SSL *s, void *buf, size_t count) | |||
741 | memcpy(buf, s->s3->hs.finished, count); | 772 | memcpy(buf, s->s3->hs.finished, count); |
742 | return (ret); | 773 | return (ret); |
743 | } | 774 | } |
775 | LSSL_ALIAS(SSL_get_finished); | ||
744 | 776 | ||
745 | /* return length of latest Finished message we expected, copy to 'buf' */ | 777 | /* return length of latest Finished message we expected, copy to 'buf' */ |
746 | size_t | 778 | size_t |
@@ -754,6 +786,7 @@ SSL_get_peer_finished(const SSL *s, void *buf, size_t count) | |||
754 | memcpy(buf, s->s3->hs.peer_finished, count); | 786 | memcpy(buf, s->s3->hs.peer_finished, count); |
755 | return (ret); | 787 | return (ret); |
756 | } | 788 | } |
789 | LSSL_ALIAS(SSL_get_peer_finished); | ||
757 | 790 | ||
758 | 791 | ||
759 | int | 792 | int |
@@ -761,30 +794,35 @@ SSL_get_verify_mode(const SSL *s) | |||
761 | { | 794 | { |
762 | return (s->verify_mode); | 795 | return (s->verify_mode); |
763 | } | 796 | } |
797 | LSSL_ALIAS(SSL_get_verify_mode); | ||
764 | 798 | ||
765 | int | 799 | int |
766 | SSL_get_verify_depth(const SSL *s) | 800 | SSL_get_verify_depth(const SSL *s) |
767 | { | 801 | { |
768 | return (X509_VERIFY_PARAM_get_depth(s->param)); | 802 | return (X509_VERIFY_PARAM_get_depth(s->param)); |
769 | } | 803 | } |
804 | LSSL_ALIAS(SSL_get_verify_depth); | ||
770 | 805 | ||
771 | int | 806 | int |
772 | (*SSL_get_verify_callback(const SSL *s))(int, X509_STORE_CTX *) | 807 | (*SSL_get_verify_callback(const SSL *s))(int, X509_STORE_CTX *) |
773 | { | 808 | { |
774 | return (s->verify_callback); | 809 | return (s->verify_callback); |
775 | } | 810 | } |
811 | LSSL_ALIAS(SSL_get_verify_callback); | ||
776 | 812 | ||
777 | void | 813 | void |
778 | SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb) | 814 | SSL_CTX_set_keylog_callback(SSL_CTX *ctx, SSL_CTX_keylog_cb_func cb) |
779 | { | 815 | { |
780 | ctx->keylog_callback = cb; | 816 | ctx->keylog_callback = cb; |
781 | } | 817 | } |
818 | LSSL_ALIAS(SSL_CTX_set_keylog_callback); | ||
782 | 819 | ||
783 | SSL_CTX_keylog_cb_func | 820 | SSL_CTX_keylog_cb_func |
784 | SSL_CTX_get_keylog_callback(const SSL_CTX *ctx) | 821 | SSL_CTX_get_keylog_callback(const SSL_CTX *ctx) |
785 | { | 822 | { |
786 | return (ctx->keylog_callback); | 823 | return (ctx->keylog_callback); |
787 | } | 824 | } |
825 | LSSL_ALIAS(SSL_CTX_get_keylog_callback); | ||
788 | 826 | ||
789 | int | 827 | int |
790 | SSL_set_num_tickets(SSL *s, size_t num_tickets) | 828 | SSL_set_num_tickets(SSL *s, size_t num_tickets) |
@@ -793,12 +831,14 @@ SSL_set_num_tickets(SSL *s, size_t num_tickets) | |||
793 | 831 | ||
794 | return 1; | 832 | return 1; |
795 | } | 833 | } |
834 | LSSL_ALIAS(SSL_set_num_tickets); | ||
796 | 835 | ||
797 | size_t | 836 | size_t |
798 | SSL_get_num_tickets(const SSL *s) | 837 | SSL_get_num_tickets(const SSL *s) |
799 | { | 838 | { |
800 | return s->num_tickets; | 839 | return s->num_tickets; |
801 | } | 840 | } |
841 | LSSL_ALIAS(SSL_get_num_tickets); | ||
802 | 842 | ||
803 | int | 843 | int |
804 | SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets) | 844 | SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets) |
@@ -807,30 +847,35 @@ SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets) | |||
807 | 847 | ||
808 | return 1; | 848 | return 1; |
809 | } | 849 | } |
850 | LSSL_ALIAS(SSL_CTX_set_num_tickets); | ||
810 | 851 | ||
811 | size_t | 852 | size_t |
812 | SSL_CTX_get_num_tickets(const SSL_CTX *ctx) | 853 | SSL_CTX_get_num_tickets(const SSL_CTX *ctx) |
813 | { | 854 | { |
814 | return ctx->num_tickets; | 855 | return ctx->num_tickets; |
815 | } | 856 | } |
857 | LSSL_ALIAS(SSL_CTX_get_num_tickets); | ||
816 | 858 | ||
817 | int | 859 | int |
818 | SSL_CTX_get_verify_mode(const SSL_CTX *ctx) | 860 | SSL_CTX_get_verify_mode(const SSL_CTX *ctx) |
819 | { | 861 | { |
820 | return (ctx->verify_mode); | 862 | return (ctx->verify_mode); |
821 | } | 863 | } |
864 | LSSL_ALIAS(SSL_CTX_get_verify_mode); | ||
822 | 865 | ||
823 | int | 866 | int |
824 | SSL_CTX_get_verify_depth(const SSL_CTX *ctx) | 867 | SSL_CTX_get_verify_depth(const SSL_CTX *ctx) |
825 | { | 868 | { |
826 | return (X509_VERIFY_PARAM_get_depth(ctx->param)); | 869 | return (X509_VERIFY_PARAM_get_depth(ctx->param)); |
827 | } | 870 | } |
871 | LSSL_ALIAS(SSL_CTX_get_verify_depth); | ||
828 | 872 | ||
829 | int | 873 | int |
830 | (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *) | 874 | (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *) |
831 | { | 875 | { |
832 | return (ctx->default_verify_callback); | 876 | return (ctx->default_verify_callback); |
833 | } | 877 | } |
878 | LSSL_ALIAS(SSL_CTX_get_verify_callback); | ||
834 | 879 | ||
835 | void | 880 | void |
836 | SSL_set_verify(SSL *s, int mode, | 881 | SSL_set_verify(SSL *s, int mode, |
@@ -840,30 +885,35 @@ SSL_set_verify(SSL *s, int mode, | |||
840 | if (callback != NULL) | 885 | if (callback != NULL) |
841 | s->verify_callback = callback; | 886 | s->verify_callback = callback; |
842 | } | 887 | } |
888 | LSSL_ALIAS(SSL_set_verify); | ||
843 | 889 | ||
844 | void | 890 | void |
845 | SSL_set_verify_depth(SSL *s, int depth) | 891 | SSL_set_verify_depth(SSL *s, int depth) |
846 | { | 892 | { |
847 | X509_VERIFY_PARAM_set_depth(s->param, depth); | 893 | X509_VERIFY_PARAM_set_depth(s->param, depth); |
848 | } | 894 | } |
895 | LSSL_ALIAS(SSL_set_verify_depth); | ||
849 | 896 | ||
850 | void | 897 | void |
851 | SSL_set_read_ahead(SSL *s, int yes) | 898 | SSL_set_read_ahead(SSL *s, int yes) |
852 | { | 899 | { |
853 | s->read_ahead = yes; | 900 | s->read_ahead = yes; |
854 | } | 901 | } |
902 | LSSL_ALIAS(SSL_set_read_ahead); | ||
855 | 903 | ||
856 | int | 904 | int |
857 | SSL_get_read_ahead(const SSL *s) | 905 | SSL_get_read_ahead(const SSL *s) |
858 | { | 906 | { |
859 | return (s->read_ahead); | 907 | return (s->read_ahead); |
860 | } | 908 | } |
909 | LSSL_ALIAS(SSL_get_read_ahead); | ||
861 | 910 | ||
862 | int | 911 | int |
863 | SSL_pending(const SSL *s) | 912 | SSL_pending(const SSL *s) |
864 | { | 913 | { |
865 | return (s->method->ssl_pending(s)); | 914 | return (s->method->ssl_pending(s)); |
866 | } | 915 | } |
916 | LSSL_ALIAS(SSL_pending); | ||
867 | 917 | ||
868 | X509 * | 918 | X509 * |
869 | SSL_get_peer_certificate(const SSL *s) | 919 | SSL_get_peer_certificate(const SSL *s) |
@@ -880,6 +930,7 @@ SSL_get_peer_certificate(const SSL *s) | |||
880 | 930 | ||
881 | return cert; | 931 | return cert; |
882 | } | 932 | } |
933 | LSSL_ALIAS(SSL_get_peer_certificate); | ||
883 | 934 | ||
884 | STACK_OF(X509) * | 935 | STACK_OF(X509) * |
885 | SSL_get_peer_cert_chain(const SSL *s) | 936 | SSL_get_peer_cert_chain(const SSL *s) |
@@ -896,6 +947,7 @@ SSL_get_peer_cert_chain(const SSL *s) | |||
896 | 947 | ||
897 | return s->s3->hs.peer_certs_no_leaf; | 948 | return s->s3->hs.peer_certs_no_leaf; |
898 | } | 949 | } |
950 | LSSL_ALIAS(SSL_get_peer_cert_chain); | ||
899 | 951 | ||
900 | STACK_OF(X509) * | 952 | STACK_OF(X509) * |
901 | SSL_get0_verified_chain(const SSL *s) | 953 | SSL_get0_verified_chain(const SSL *s) |
@@ -904,6 +956,7 @@ SSL_get0_verified_chain(const SSL *s) | |||
904 | return NULL; | 956 | return NULL; |
905 | return s->s3->hs.verified_chain; | 957 | return s->s3->hs.verified_chain; |
906 | } | 958 | } |
959 | LSSL_ALIAS(SSL_get0_verified_chain); | ||
907 | 960 | ||
908 | /* | 961 | /* |
909 | * Now in theory, since the calling process own 't' it should be safe to | 962 | * Now in theory, since the calling process own 't' it should be safe to |
@@ -939,6 +992,7 @@ SSL_copy_session_id(SSL *t, const SSL *f) | |||
939 | 992 | ||
940 | return 1; | 993 | return 1; |
941 | } | 994 | } |
995 | LSSL_ALIAS(SSL_copy_session_id); | ||
942 | 996 | ||
943 | /* Fix this so it checks all the valid key/cert options */ | 997 | /* Fix this so it checks all the valid key/cert options */ |
944 | int | 998 | int |
@@ -956,6 +1010,7 @@ SSL_CTX_check_private_key(const SSL_CTX *ctx) | |||
956 | return (X509_check_private_key(ctx->cert->key->x509, | 1010 | return (X509_check_private_key(ctx->cert->key->x509, |
957 | ctx->cert->key->privatekey)); | 1011 | ctx->cert->key->privatekey)); |
958 | } | 1012 | } |
1013 | LSSL_ALIAS(SSL_CTX_check_private_key); | ||
959 | 1014 | ||
960 | /* Fix this function so that it takes an optional type parameter */ | 1015 | /* Fix this function so that it takes an optional type parameter */ |
961 | int | 1016 | int |
@@ -980,6 +1035,7 @@ SSL_check_private_key(const SSL *ssl) | |||
980 | return (X509_check_private_key(ssl->cert->key->x509, | 1035 | return (X509_check_private_key(ssl->cert->key->x509, |
981 | ssl->cert->key->privatekey)); | 1036 | ssl->cert->key->privatekey)); |
982 | } | 1037 | } |
1038 | LSSL_ALIAS(SSL_check_private_key); | ||
983 | 1039 | ||
984 | int | 1040 | int |
985 | SSL_accept(SSL *s) | 1041 | SSL_accept(SSL *s) |
@@ -989,6 +1045,7 @@ SSL_accept(SSL *s) | |||
989 | 1045 | ||
990 | return (s->method->ssl_accept(s)); | 1046 | return (s->method->ssl_accept(s)); |
991 | } | 1047 | } |
1048 | LSSL_ALIAS(SSL_accept); | ||
992 | 1049 | ||
993 | int | 1050 | int |
994 | SSL_connect(SSL *s) | 1051 | SSL_connect(SSL *s) |
@@ -998,18 +1055,21 @@ SSL_connect(SSL *s) | |||
998 | 1055 | ||
999 | return (s->method->ssl_connect(s)); | 1056 | return (s->method->ssl_connect(s)); |
1000 | } | 1057 | } |
1058 | LSSL_ALIAS(SSL_connect); | ||
1001 | 1059 | ||
1002 | int | 1060 | int |
1003 | SSL_is_dtls(const SSL *s) | 1061 | SSL_is_dtls(const SSL *s) |
1004 | { | 1062 | { |
1005 | return s->method->dtls; | 1063 | return s->method->dtls; |
1006 | } | 1064 | } |
1065 | LSSL_ALIAS(SSL_is_dtls); | ||
1007 | 1066 | ||
1008 | int | 1067 | int |
1009 | SSL_is_server(const SSL *s) | 1068 | SSL_is_server(const SSL *s) |
1010 | { | 1069 | { |
1011 | return s->server; | 1070 | return s->server; |
1012 | } | 1071 | } |
1072 | LSSL_ALIAS(SSL_is_server); | ||
1013 | 1073 | ||
1014 | static long | 1074 | static long |
1015 | ssl_get_default_timeout() | 1075 | ssl_get_default_timeout() |
@@ -1026,6 +1086,7 @@ SSL_get_default_timeout(const SSL *s) | |||
1026 | { | 1086 | { |
1027 | return (ssl_get_default_timeout()); | 1087 | return (ssl_get_default_timeout()); |
1028 | } | 1088 | } |
1089 | LSSL_ALIAS(SSL_get_default_timeout); | ||
1029 | 1090 | ||
1030 | int | 1091 | int |
1031 | SSL_read(SSL *s, void *buf, int num) | 1092 | SSL_read(SSL *s, void *buf, int num) |
@@ -1051,6 +1112,7 @@ SSL_read(SSL *s, void *buf, int num) | |||
1051 | } | 1112 | } |
1052 | return ssl3_read(s, buf, num); | 1113 | return ssl3_read(s, buf, num); |
1053 | } | 1114 | } |
1115 | LSSL_ALIAS(SSL_read); | ||
1054 | 1116 | ||
1055 | int | 1117 | int |
1056 | SSL_read_ex(SSL *s, void *buf, size_t num, size_t *bytes_read) | 1118 | SSL_read_ex(SSL *s, void *buf, size_t num, size_t *bytes_read) |
@@ -1070,6 +1132,7 @@ SSL_read_ex(SSL *s, void *buf, size_t num, size_t *bytes_read) | |||
1070 | 1132 | ||
1071 | return ret > 0; | 1133 | return ret > 0; |
1072 | } | 1134 | } |
1135 | LSSL_ALIAS(SSL_read_ex); | ||
1073 | 1136 | ||
1074 | int | 1137 | int |
1075 | SSL_peek(SSL *s, void *buf, int num) | 1138 | SSL_peek(SSL *s, void *buf, int num) |
@@ -1094,6 +1157,7 @@ SSL_peek(SSL *s, void *buf, int num) | |||
1094 | } | 1157 | } |
1095 | return ssl3_peek(s, buf, num); | 1158 | return ssl3_peek(s, buf, num); |
1096 | } | 1159 | } |
1160 | LSSL_ALIAS(SSL_peek); | ||
1097 | 1161 | ||
1098 | int | 1162 | int |
1099 | SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *bytes_peeked) | 1163 | SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *bytes_peeked) |
@@ -1113,6 +1177,7 @@ SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *bytes_peeked) | |||
1113 | 1177 | ||
1114 | return ret > 0; | 1178 | return ret > 0; |
1115 | } | 1179 | } |
1180 | LSSL_ALIAS(SSL_peek_ex); | ||
1116 | 1181 | ||
1117 | int | 1182 | int |
1118 | SSL_write(SSL *s, const void *buf, int num) | 1183 | SSL_write(SSL *s, const void *buf, int num) |
@@ -1139,6 +1204,7 @@ SSL_write(SSL *s, const void *buf, int num) | |||
1139 | } | 1204 | } |
1140 | return ssl3_write(s, buf, num); | 1205 | return ssl3_write(s, buf, num); |
1141 | } | 1206 | } |
1207 | LSSL_ALIAS(SSL_write); | ||
1142 | 1208 | ||
1143 | int | 1209 | int |
1144 | SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *bytes_written) | 1210 | SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *bytes_written) |
@@ -1164,36 +1230,42 @@ SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *bytes_written) | |||
1164 | 1230 | ||
1165 | return ret > 0; | 1231 | return ret > 0; |
1166 | } | 1232 | } |
1233 | LSSL_ALIAS(SSL_write_ex); | ||
1167 | 1234 | ||
1168 | uint32_t | 1235 | uint32_t |
1169 | SSL_CTX_get_max_early_data(const SSL_CTX *ctx) | 1236 | SSL_CTX_get_max_early_data(const SSL_CTX *ctx) |
1170 | { | 1237 | { |
1171 | return 0; | 1238 | return 0; |
1172 | } | 1239 | } |
1240 | LSSL_ALIAS(SSL_CTX_get_max_early_data); | ||
1173 | 1241 | ||
1174 | int | 1242 | int |
1175 | SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data) | 1243 | SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data) |
1176 | { | 1244 | { |
1177 | return 1; | 1245 | return 1; |
1178 | } | 1246 | } |
1247 | LSSL_ALIAS(SSL_CTX_set_max_early_data); | ||
1179 | 1248 | ||
1180 | uint32_t | 1249 | uint32_t |
1181 | SSL_get_max_early_data(const SSL *s) | 1250 | SSL_get_max_early_data(const SSL *s) |
1182 | { | 1251 | { |
1183 | return 0; | 1252 | return 0; |
1184 | } | 1253 | } |
1254 | LSSL_ALIAS(SSL_get_max_early_data); | ||
1185 | 1255 | ||
1186 | int | 1256 | int |
1187 | SSL_set_max_early_data(SSL *s, uint32_t max_early_data) | 1257 | SSL_set_max_early_data(SSL *s, uint32_t max_early_data) |
1188 | { | 1258 | { |
1189 | return 1; | 1259 | return 1; |
1190 | } | 1260 | } |
1261 | LSSL_ALIAS(SSL_set_max_early_data); | ||
1191 | 1262 | ||
1192 | int | 1263 | int |
1193 | SSL_get_early_data_status(const SSL *s) | 1264 | SSL_get_early_data_status(const SSL *s) |
1194 | { | 1265 | { |
1195 | return SSL_EARLY_DATA_REJECTED; | 1266 | return SSL_EARLY_DATA_REJECTED; |
1196 | } | 1267 | } |
1268 | LSSL_ALIAS(SSL_get_early_data_status); | ||
1197 | 1269 | ||
1198 | int | 1270 | int |
1199 | SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes) | 1271 | SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes) |
@@ -1207,6 +1279,7 @@ SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes) | |||
1207 | 1279 | ||
1208 | return SSL_READ_EARLY_DATA_FINISH; | 1280 | return SSL_READ_EARLY_DATA_FINISH; |
1209 | } | 1281 | } |
1282 | LSSL_ALIAS(SSL_read_early_data); | ||
1210 | 1283 | ||
1211 | int | 1284 | int |
1212 | SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written) | 1285 | SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written) |
@@ -1215,6 +1288,7 @@ SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written) | |||
1215 | SSLerror(s, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); | 1288 | SSLerror(s, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); |
1216 | return 0; | 1289 | return 0; |
1217 | } | 1290 | } |
1291 | LSSL_ALIAS(SSL_write_early_data); | ||
1218 | 1292 | ||
1219 | int | 1293 | int |
1220 | SSL_shutdown(SSL *s) | 1294 | SSL_shutdown(SSL *s) |
@@ -1236,6 +1310,7 @@ SSL_shutdown(SSL *s) | |||
1236 | 1310 | ||
1237 | return (1); | 1311 | return (1); |
1238 | } | 1312 | } |
1313 | LSSL_ALIAS(SSL_shutdown); | ||
1239 | 1314 | ||
1240 | int | 1315 | int |
1241 | SSL_renegotiate(SSL *s) | 1316 | SSL_renegotiate(SSL *s) |
@@ -1247,6 +1322,7 @@ SSL_renegotiate(SSL *s) | |||
1247 | 1322 | ||
1248 | return (s->method->ssl_renegotiate(s)); | 1323 | return (s->method->ssl_renegotiate(s)); |
1249 | } | 1324 | } |
1325 | LSSL_ALIAS(SSL_renegotiate); | ||
1250 | 1326 | ||
1251 | int | 1327 | int |
1252 | SSL_renegotiate_abbreviated(SSL *s) | 1328 | SSL_renegotiate_abbreviated(SSL *s) |
@@ -1258,6 +1334,7 @@ SSL_renegotiate_abbreviated(SSL *s) | |||
1258 | 1334 | ||
1259 | return (s->method->ssl_renegotiate(s)); | 1335 | return (s->method->ssl_renegotiate(s)); |
1260 | } | 1336 | } |
1337 | LSSL_ALIAS(SSL_renegotiate_abbreviated); | ||
1261 | 1338 | ||
1262 | int | 1339 | int |
1263 | SSL_renegotiate_pending(SSL *s) | 1340 | SSL_renegotiate_pending(SSL *s) |
@@ -1268,6 +1345,7 @@ SSL_renegotiate_pending(SSL *s) | |||
1268 | */ | 1345 | */ |
1269 | return (s->renegotiate != 0); | 1346 | return (s->renegotiate != 0); |
1270 | } | 1347 | } |
1348 | LSSL_ALIAS(SSL_renegotiate_pending); | ||
1271 | 1349 | ||
1272 | long | 1350 | long |
1273 | SSL_ctrl(SSL *s, int cmd, long larg, void *parg) | 1351 | SSL_ctrl(SSL *s, int cmd, long larg, void *parg) |
@@ -1325,6 +1403,7 @@ SSL_ctrl(SSL *s, int cmd, long larg, void *parg) | |||
1325 | return ssl3_ctrl(s, cmd, larg, parg); | 1403 | return ssl3_ctrl(s, cmd, larg, parg); |
1326 | } | 1404 | } |
1327 | } | 1405 | } |
1406 | LSSL_ALIAS(SSL_ctrl); | ||
1328 | 1407 | ||
1329 | long | 1408 | long |
1330 | SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) | 1409 | SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) |
@@ -1338,12 +1417,14 @@ SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) | |||
1338 | return (ssl3_callback_ctrl(s, cmd, fp)); | 1417 | return (ssl3_callback_ctrl(s, cmd, fp)); |
1339 | } | 1418 | } |
1340 | } | 1419 | } |
1420 | LSSL_ALIAS(SSL_callback_ctrl); | ||
1341 | 1421 | ||
1342 | struct lhash_st_SSL_SESSION * | 1422 | struct lhash_st_SSL_SESSION * |
1343 | SSL_CTX_sessions(SSL_CTX *ctx) | 1423 | SSL_CTX_sessions(SSL_CTX *ctx) |
1344 | { | 1424 | { |
1345 | return (ctx->sessions); | 1425 | return (ctx->sessions); |
1346 | } | 1426 | } |
1427 | LSSL_ALIAS(SSL_CTX_sessions); | ||
1347 | 1428 | ||
1348 | long | 1429 | long |
1349 | SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) | 1430 | SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) |
@@ -1423,6 +1504,7 @@ SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg) | |||
1423 | return (ssl3_ctx_ctrl(ctx, cmd, larg, parg)); | 1504 | return (ssl3_ctx_ctrl(ctx, cmd, larg, parg)); |
1424 | } | 1505 | } |
1425 | } | 1506 | } |
1507 | LSSL_ALIAS(SSL_CTX_ctrl); | ||
1426 | 1508 | ||
1427 | long | 1509 | long |
1428 | SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) | 1510 | SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) |
@@ -1436,6 +1518,7 @@ SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) | |||
1436 | return (ssl3_ctx_callback_ctrl(ctx, cmd, fp)); | 1518 | return (ssl3_ctx_callback_ctrl(ctx, cmd, fp)); |
1437 | } | 1519 | } |
1438 | } | 1520 | } |
1521 | LSSL_ALIAS(SSL_CTX_callback_ctrl); | ||
1439 | 1522 | ||
1440 | int | 1523 | int |
1441 | ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b) | 1524 | ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b) |
@@ -1459,6 +1542,7 @@ SSL_get_ciphers(const SSL *s) | |||
1459 | 1542 | ||
1460 | return (s->ctx->cipher_list); | 1543 | return (s->ctx->cipher_list); |
1461 | } | 1544 | } |
1545 | LSSL_ALIAS(SSL_get_ciphers); | ||
1462 | 1546 | ||
1463 | STACK_OF(SSL_CIPHER) * | 1547 | STACK_OF(SSL_CIPHER) * |
1464 | SSL_get_client_ciphers(const SSL *s) | 1548 | SSL_get_client_ciphers(const SSL *s) |
@@ -1467,6 +1551,7 @@ SSL_get_client_ciphers(const SSL *s) | |||
1467 | return NULL; | 1551 | return NULL; |
1468 | return s->session->ciphers; | 1552 | return s->session->ciphers; |
1469 | } | 1553 | } |
1554 | LSSL_ALIAS(SSL_get_client_ciphers); | ||
1470 | 1555 | ||
1471 | STACK_OF(SSL_CIPHER) * | 1556 | STACK_OF(SSL_CIPHER) * |
1472 | SSL_get1_supported_ciphers(SSL *s) | 1557 | SSL_get1_supported_ciphers(SSL *s) |
@@ -1504,6 +1589,7 @@ SSL_get1_supported_ciphers(SSL *s) | |||
1504 | sk_SSL_CIPHER_free(supported_ciphers); | 1589 | sk_SSL_CIPHER_free(supported_ciphers); |
1505 | return NULL; | 1590 | return NULL; |
1506 | } | 1591 | } |
1592 | LSSL_ALIAS(SSL_get1_supported_ciphers); | ||
1507 | 1593 | ||
1508 | /* See if we have any ECC cipher suites. */ | 1594 | /* See if we have any ECC cipher suites. */ |
1509 | int | 1595 | int |
@@ -1544,6 +1630,7 @@ SSL_get_cipher_list(const SSL *s, int n) | |||
1544 | 1630 | ||
1545 | return (cipher->name); | 1631 | return (cipher->name); |
1546 | } | 1632 | } |
1633 | LSSL_ALIAS(SSL_get_cipher_list); | ||
1547 | 1634 | ||
1548 | STACK_OF(SSL_CIPHER) * | 1635 | STACK_OF(SSL_CIPHER) * |
1549 | SSL_CTX_get_ciphers(const SSL_CTX *ctx) | 1636 | SSL_CTX_get_ciphers(const SSL_CTX *ctx) |
@@ -1552,6 +1639,7 @@ SSL_CTX_get_ciphers(const SSL_CTX *ctx) | |||
1552 | return NULL; | 1639 | return NULL; |
1553 | return ctx->cipher_list; | 1640 | return ctx->cipher_list; |
1554 | } | 1641 | } |
1642 | LSSL_ALIAS(SSL_CTX_get_ciphers); | ||
1555 | 1643 | ||
1556 | /* Specify the ciphers to be used by default by the SSL_CTX. */ | 1644 | /* Specify the ciphers to be used by default by the SSL_CTX. */ |
1557 | int | 1645 | int |
@@ -1576,6 +1664,7 @@ SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str) | |||
1576 | } | 1664 | } |
1577 | return (1); | 1665 | return (1); |
1578 | } | 1666 | } |
1667 | LSSL_ALIAS(SSL_CTX_set_cipher_list); | ||
1579 | 1668 | ||
1580 | int | 1669 | int |
1581 | SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str) | 1670 | SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str) |
@@ -1590,6 +1679,7 @@ SSL_CTX_set_ciphersuites(SSL_CTX *ctx, const char *str) | |||
1590 | 1679 | ||
1591 | return 1; | 1680 | return 1; |
1592 | } | 1681 | } |
1682 | LSSL_ALIAS(SSL_CTX_set_ciphersuites); | ||
1593 | 1683 | ||
1594 | /* Specify the ciphers to be used by the SSL. */ | 1684 | /* Specify the ciphers to be used by the SSL. */ |
1595 | int | 1685 | int |
@@ -1611,6 +1701,7 @@ SSL_set_cipher_list(SSL *s, const char *str) | |||
1611 | } | 1701 | } |
1612 | return (1); | 1702 | return (1); |
1613 | } | 1703 | } |
1704 | LSSL_ALIAS(SSL_set_cipher_list); | ||
1614 | 1705 | ||
1615 | int | 1706 | int |
1616 | SSL_set_ciphersuites(SSL *s, const char *str) | 1707 | SSL_set_ciphersuites(SSL *s, const char *str) |
@@ -1630,6 +1721,7 @@ SSL_set_ciphersuites(SSL *s, const char *str) | |||
1630 | 1721 | ||
1631 | return 1; | 1722 | return 1; |
1632 | } | 1723 | } |
1724 | LSSL_ALIAS(SSL_set_ciphersuites); | ||
1633 | 1725 | ||
1634 | char * | 1726 | char * |
1635 | SSL_get_shared_ciphers(const SSL *s, char *buf, int len) | 1727 | SSL_get_shared_ciphers(const SSL *s, char *buf, int len) |
@@ -1671,6 +1763,7 @@ SSL_get_shared_ciphers(const SSL *s, char *buf, int len) | |||
1671 | *end = '\0'; | 1763 | *end = '\0'; |
1672 | return buf; | 1764 | return buf; |
1673 | } | 1765 | } |
1766 | LSSL_ALIAS(SSL_get_shared_ciphers); | ||
1674 | 1767 | ||
1675 | /* | 1768 | /* |
1676 | * Return a servername extension value if provided in Client Hello, or NULL. | 1769 | * Return a servername extension value if provided in Client Hello, or NULL. |
@@ -1686,6 +1779,7 @@ SSL_get_servername(const SSL *s, const int type) | |||
1686 | s->session->tlsext_hostname : | 1779 | s->session->tlsext_hostname : |
1687 | s->tlsext_hostname); | 1780 | s->tlsext_hostname); |
1688 | } | 1781 | } |
1782 | LSSL_ALIAS(SSL_get_servername); | ||
1689 | 1783 | ||
1690 | int | 1784 | int |
1691 | SSL_get_servername_type(const SSL *s) | 1785 | SSL_get_servername_type(const SSL *s) |
@@ -1696,6 +1790,7 @@ SSL_get_servername_type(const SSL *s) | |||
1696 | return (TLSEXT_NAMETYPE_host_name); | 1790 | return (TLSEXT_NAMETYPE_host_name); |
1697 | return (-1); | 1791 | return (-1); |
1698 | } | 1792 | } |
1793 | LSSL_ALIAS(SSL_get_servername_type); | ||
1699 | 1794 | ||
1700 | /* | 1795 | /* |
1701 | * SSL_select_next_proto implements standard protocol selection. It is | 1796 | * SSL_select_next_proto implements standard protocol selection. It is |
@@ -1749,6 +1844,7 @@ SSL_select_next_proto(unsigned char **out, unsigned char *outlen, | |||
1749 | *outlen = result[0]; | 1844 | *outlen = result[0]; |
1750 | return (status); | 1845 | return (status); |
1751 | } | 1846 | } |
1847 | LSSL_ALIAS(SSL_select_next_proto); | ||
1752 | 1848 | ||
1753 | /* SSL_get0_next_proto_negotiated is deprecated. */ | 1849 | /* SSL_get0_next_proto_negotiated is deprecated. */ |
1754 | void | 1850 | void |
@@ -1758,6 +1854,7 @@ SSL_get0_next_proto_negotiated(const SSL *s, const unsigned char **data, | |||
1758 | *data = NULL; | 1854 | *data = NULL; |
1759 | *len = 0; | 1855 | *len = 0; |
1760 | } | 1856 | } |
1857 | LSSL_ALIAS(SSL_get0_next_proto_negotiated); | ||
1761 | 1858 | ||
1762 | /* SSL_CTX_set_next_protos_advertised_cb is deprecated. */ | 1859 | /* SSL_CTX_set_next_protos_advertised_cb is deprecated. */ |
1763 | void | 1860 | void |
@@ -1765,6 +1862,7 @@ SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *ctx, int (*cb) (SSL *ssl, | |||
1765 | const unsigned char **out, unsigned int *outlen, void *arg), void *arg) | 1862 | const unsigned char **out, unsigned int *outlen, void *arg), void *arg) |
1766 | { | 1863 | { |
1767 | } | 1864 | } |
1865 | LSSL_ALIAS(SSL_CTX_set_next_protos_advertised_cb); | ||
1768 | 1866 | ||
1769 | /* SSL_CTX_set_next_proto_select_cb is deprecated. */ | 1867 | /* SSL_CTX_set_next_proto_select_cb is deprecated. */ |
1770 | void | 1868 | void |
@@ -1773,6 +1871,7 @@ SSL_CTX_set_next_proto_select_cb(SSL_CTX *ctx, int (*cb) (SSL *s, | |||
1773 | unsigned int inlen, void *arg), void *arg) | 1871 | unsigned int inlen, void *arg), void *arg) |
1774 | { | 1872 | { |
1775 | } | 1873 | } |
1874 | LSSL_ALIAS(SSL_CTX_set_next_proto_select_cb); | ||
1776 | 1875 | ||
1777 | /* | 1876 | /* |
1778 | * SSL_CTX_set_alpn_protos sets the ALPN protocol list to the specified | 1877 | * SSL_CTX_set_alpn_protos sets the ALPN protocol list to the specified |
@@ -1806,6 +1905,7 @@ SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos, | |||
1806 | /* NOTE: Return values are the reverse of what you expect. */ | 1905 | /* NOTE: Return values are the reverse of what you expect. */ |
1807 | return failed; | 1906 | return failed; |
1808 | } | 1907 | } |
1908 | LSSL_ALIAS(SSL_CTX_set_alpn_protos); | ||
1809 | 1909 | ||
1810 | /* | 1910 | /* |
1811 | * SSL_set_alpn_protos sets the ALPN protocol list to the specified | 1911 | * SSL_set_alpn_protos sets the ALPN protocol list to the specified |
@@ -1839,6 +1939,7 @@ SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos, | |||
1839 | /* NOTE: Return values are the reverse of what you expect. */ | 1939 | /* NOTE: Return values are the reverse of what you expect. */ |
1840 | return failed; | 1940 | return failed; |
1841 | } | 1941 | } |
1942 | LSSL_ALIAS(SSL_set_alpn_protos); | ||
1842 | 1943 | ||
1843 | /* | 1944 | /* |
1844 | * SSL_CTX_set_alpn_select_cb sets a callback function that is called during | 1945 | * SSL_CTX_set_alpn_select_cb sets a callback function that is called during |
@@ -1853,6 +1954,7 @@ SSL_CTX_set_alpn_select_cb(SSL_CTX* ctx, | |||
1853 | ctx->alpn_select_cb = cb; | 1954 | ctx->alpn_select_cb = cb; |
1854 | ctx->alpn_select_cb_arg = arg; | 1955 | ctx->alpn_select_cb_arg = arg; |
1855 | } | 1956 | } |
1957 | LSSL_ALIAS(SSL_CTX_set_alpn_select_cb); | ||
1856 | 1958 | ||
1857 | /* | 1959 | /* |
1858 | * SSL_get0_alpn_selected gets the selected ALPN protocol (if any). On return | 1960 | * SSL_get0_alpn_selected gets the selected ALPN protocol (if any). On return |
@@ -1867,12 +1969,14 @@ SSL_get0_alpn_selected(const SSL *ssl, const unsigned char **data, | |||
1867 | *data = ssl->s3->alpn_selected; | 1969 | *data = ssl->s3->alpn_selected; |
1868 | *len = ssl->s3->alpn_selected_len; | 1970 | *len = ssl->s3->alpn_selected_len; |
1869 | } | 1971 | } |
1972 | LSSL_ALIAS(SSL_get0_alpn_selected); | ||
1870 | 1973 | ||
1871 | void | 1974 | void |
1872 | SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb) | 1975 | SSL_set_psk_use_session_callback(SSL *s, SSL_psk_use_session_cb_func cb) |
1873 | { | 1976 | { |
1874 | return; | 1977 | return; |
1875 | } | 1978 | } |
1979 | LSSL_ALIAS(SSL_set_psk_use_session_callback); | ||
1876 | 1980 | ||
1877 | int | 1981 | int |
1878 | SSL_export_keying_material(SSL *s, unsigned char *out, size_t out_len, | 1982 | SSL_export_keying_material(SSL *s, unsigned char *out, size_t out_len, |
@@ -1891,6 +1995,7 @@ SSL_export_keying_material(SSL *s, unsigned char *out, size_t out_len, | |||
1891 | return tls12_exporter(s, label, label_len, context, context_len, | 1995 | return tls12_exporter(s, label, label_len, context, context_len, |
1892 | use_context, out, out_len); | 1996 | use_context, out, out_len); |
1893 | } | 1997 | } |
1998 | LSSL_ALIAS(SSL_export_keying_material); | ||
1894 | 1999 | ||
1895 | static unsigned long | 2000 | static unsigned long |
1896 | ssl_session_hash(const SSL_SESSION *a) | 2001 | ssl_session_hash(const SSL_SESSION *a) |
@@ -2092,6 +2197,7 @@ SSL_CTX_new(const SSL_METHOD *meth) | |||
2092 | SSL_CTX_free(ret); | 2197 | SSL_CTX_free(ret); |
2093 | return (NULL); | 2198 | return (NULL); |
2094 | } | 2199 | } |
2200 | LSSL_ALIAS(SSL_CTX_new); | ||
2095 | 2201 | ||
2096 | void | 2202 | void |
2097 | SSL_CTX_free(SSL_CTX *ctx) | 2203 | SSL_CTX_free(SSL_CTX *ctx) |
@@ -2146,6 +2252,7 @@ SSL_CTX_free(SSL_CTX *ctx) | |||
2146 | 2252 | ||
2147 | free(ctx); | 2253 | free(ctx); |
2148 | } | 2254 | } |
2255 | LSSL_ALIAS(SSL_CTX_free); | ||
2149 | 2256 | ||
2150 | int | 2257 | int |
2151 | SSL_CTX_up_ref(SSL_CTX *ctx) | 2258 | SSL_CTX_up_ref(SSL_CTX *ctx) |
@@ -2153,30 +2260,35 @@ SSL_CTX_up_ref(SSL_CTX *ctx) | |||
2153 | int refs = CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX); | 2260 | int refs = CRYPTO_add(&ctx->references, 1, CRYPTO_LOCK_SSL_CTX); |
2154 | return ((refs > 1) ? 1 : 0); | 2261 | return ((refs > 1) ? 1 : 0); |
2155 | } | 2262 | } |
2263 | LSSL_ALIAS(SSL_CTX_up_ref); | ||
2156 | 2264 | ||
2157 | pem_password_cb * | 2265 | pem_password_cb * |
2158 | SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx) | 2266 | SSL_CTX_get_default_passwd_cb(SSL_CTX *ctx) |
2159 | { | 2267 | { |
2160 | return (ctx->default_passwd_callback); | 2268 | return (ctx->default_passwd_callback); |
2161 | } | 2269 | } |
2270 | LSSL_ALIAS(SSL_CTX_get_default_passwd_cb); | ||
2162 | 2271 | ||
2163 | void | 2272 | void |
2164 | SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) | 2273 | SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb) |
2165 | { | 2274 | { |
2166 | ctx->default_passwd_callback = cb; | 2275 | ctx->default_passwd_callback = cb; |
2167 | } | 2276 | } |
2277 | LSSL_ALIAS(SSL_CTX_set_default_passwd_cb); | ||
2168 | 2278 | ||
2169 | void * | 2279 | void * |
2170 | SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx) | 2280 | SSL_CTX_get_default_passwd_cb_userdata(SSL_CTX *ctx) |
2171 | { | 2281 | { |
2172 | return ctx->default_passwd_callback_userdata; | 2282 | return ctx->default_passwd_callback_userdata; |
2173 | } | 2283 | } |
2284 | LSSL_ALIAS(SSL_CTX_get_default_passwd_cb_userdata); | ||
2174 | 2285 | ||
2175 | void | 2286 | void |
2176 | SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u) | 2287 | SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u) |
2177 | { | 2288 | { |
2178 | ctx->default_passwd_callback_userdata = u; | 2289 | ctx->default_passwd_callback_userdata = u; |
2179 | } | 2290 | } |
2291 | LSSL_ALIAS(SSL_CTX_set_default_passwd_cb_userdata); | ||
2180 | 2292 | ||
2181 | void | 2293 | void |
2182 | SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, | 2294 | SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, |
@@ -2185,6 +2297,7 @@ SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, | |||
2185 | ctx->app_verify_callback = cb; | 2297 | ctx->app_verify_callback = cb; |
2186 | ctx->app_verify_arg = arg; | 2298 | ctx->app_verify_arg = arg; |
2187 | } | 2299 | } |
2300 | LSSL_ALIAS(SSL_CTX_set_cert_verify_callback); | ||
2188 | 2301 | ||
2189 | void | 2302 | void |
2190 | SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*cb)(int, X509_STORE_CTX *)) | 2303 | SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*cb)(int, X509_STORE_CTX *)) |
@@ -2192,12 +2305,14 @@ SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*cb)(int, X509_STORE_CTX *)) | |||
2192 | ctx->verify_mode = mode; | 2305 | ctx->verify_mode = mode; |
2193 | ctx->default_verify_callback = cb; | 2306 | ctx->default_verify_callback = cb; |
2194 | } | 2307 | } |
2308 | LSSL_ALIAS(SSL_CTX_set_verify); | ||
2195 | 2309 | ||
2196 | void | 2310 | void |
2197 | SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth) | 2311 | SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth) |
2198 | { | 2312 | { |
2199 | X509_VERIFY_PARAM_set_depth(ctx->param, depth); | 2313 | X509_VERIFY_PARAM_set_depth(ctx->param, depth); |
2200 | } | 2314 | } |
2315 | LSSL_ALIAS(SSL_CTX_set_verify_depth); | ||
2201 | 2316 | ||
2202 | void | 2317 | void |
2203 | ssl_set_cert_masks(SSL_CERT *c, const SSL_CIPHER *cipher) | 2318 | ssl_set_cert_masks(SSL_CERT *c, const SSL_CIPHER *cipher) |
@@ -2478,6 +2593,7 @@ SSL_get_ssl_method(SSL *s) | |||
2478 | { | 2593 | { |
2479 | return (s->method); | 2594 | return (s->method); |
2480 | } | 2595 | } |
2596 | LSSL_ALIAS(SSL_get_ssl_method); | ||
2481 | 2597 | ||
2482 | int | 2598 | int |
2483 | SSL_set_ssl_method(SSL *s, const SSL_METHOD *method) | 2599 | SSL_set_ssl_method(SSL *s, const SSL_METHOD *method) |
@@ -2504,6 +2620,7 @@ SSL_set_ssl_method(SSL *s, const SSL_METHOD *method) | |||
2504 | 2620 | ||
2505 | return (ret); | 2621 | return (ret); |
2506 | } | 2622 | } |
2623 | LSSL_ALIAS(SSL_set_ssl_method); | ||
2507 | 2624 | ||
2508 | int | 2625 | int |
2509 | SSL_get_error(const SSL *s, int i) | 2626 | SSL_get_error(const SSL *s, int i) |
@@ -2583,6 +2700,7 @@ SSL_get_error(const SSL *s, int i) | |||
2583 | 2700 | ||
2584 | return (SSL_ERROR_SYSCALL); | 2701 | return (SSL_ERROR_SYSCALL); |
2585 | } | 2702 | } |
2703 | LSSL_ALIAS(SSL_get_error); | ||
2586 | 2704 | ||
2587 | int | 2705 | int |
2588 | SSL_CTX_set_quic_method(SSL_CTX *ctx, const SSL_QUIC_METHOD *quic_method) | 2706 | SSL_CTX_set_quic_method(SSL_CTX *ctx, const SSL_QUIC_METHOD *quic_method) |
@@ -2594,6 +2712,7 @@ SSL_CTX_set_quic_method(SSL_CTX *ctx, const SSL_QUIC_METHOD *quic_method) | |||
2594 | 2712 | ||
2595 | return 1; | 2713 | return 1; |
2596 | } | 2714 | } |
2715 | LSSL_ALIAS(SSL_CTX_set_quic_method); | ||
2597 | 2716 | ||
2598 | int | 2717 | int |
2599 | SSL_set_quic_method(SSL *ssl, const SSL_QUIC_METHOD *quic_method) | 2718 | SSL_set_quic_method(SSL *ssl, const SSL_QUIC_METHOD *quic_method) |
@@ -2605,6 +2724,7 @@ SSL_set_quic_method(SSL *ssl, const SSL_QUIC_METHOD *quic_method) | |||
2605 | 2724 | ||
2606 | return 1; | 2725 | return 1; |
2607 | } | 2726 | } |
2727 | LSSL_ALIAS(SSL_set_quic_method); | ||
2608 | 2728 | ||
2609 | size_t | 2729 | size_t |
2610 | SSL_quic_max_handshake_flight_len(const SSL *ssl, | 2730 | SSL_quic_max_handshake_flight_len(const SSL *ssl, |
@@ -2652,18 +2772,21 @@ SSL_quic_max_handshake_flight_len(const SSL *ssl, | |||
2652 | 2772 | ||
2653 | return 0; | 2773 | return 0; |
2654 | } | 2774 | } |
2775 | LSSL_ALIAS(SSL_quic_max_handshake_flight_len); | ||
2655 | 2776 | ||
2656 | enum ssl_encryption_level_t | 2777 | enum ssl_encryption_level_t |
2657 | SSL_quic_read_level(const SSL *ssl) | 2778 | SSL_quic_read_level(const SSL *ssl) |
2658 | { | 2779 | { |
2659 | return ssl->s3->hs.tls13.quic_read_level; | 2780 | return ssl->s3->hs.tls13.quic_read_level; |
2660 | } | 2781 | } |
2782 | LSSL_ALIAS(SSL_quic_read_level); | ||
2661 | 2783 | ||
2662 | enum ssl_encryption_level_t | 2784 | enum ssl_encryption_level_t |
2663 | SSL_quic_write_level(const SSL *ssl) | 2785 | SSL_quic_write_level(const SSL *ssl) |
2664 | { | 2786 | { |
2665 | return ssl->s3->hs.tls13.quic_write_level; | 2787 | return ssl->s3->hs.tls13.quic_write_level; |
2666 | } | 2788 | } |
2789 | LSSL_ALIAS(SSL_quic_write_level); | ||
2667 | 2790 | ||
2668 | int | 2791 | int |
2669 | SSL_provide_quic_data(SSL *ssl, enum ssl_encryption_level_t level, | 2792 | SSL_provide_quic_data(SSL *ssl, enum ssl_encryption_level_t level, |
@@ -2697,6 +2820,7 @@ SSL_provide_quic_data(SSL *ssl, enum ssl_encryption_level_t level, | |||
2697 | */ | 2820 | */ |
2698 | return tls_buffer_append(ssl->s3->hs.tls13.quic_read_buffer, data, len); | 2821 | return tls_buffer_append(ssl->s3->hs.tls13.quic_read_buffer, data, len); |
2699 | } | 2822 | } |
2823 | LSSL_ALIAS(SSL_provide_quic_data); | ||
2700 | 2824 | ||
2701 | int | 2825 | int |
2702 | SSL_process_quic_post_handshake(SSL *ssl) | 2826 | SSL_process_quic_post_handshake(SSL *ssl) |
@@ -2704,6 +2828,7 @@ SSL_process_quic_post_handshake(SSL *ssl) | |||
2704 | /* XXX - this needs to run PHH received. */ | 2828 | /* XXX - this needs to run PHH received. */ |
2705 | return 1; | 2829 | return 1; |
2706 | } | 2830 | } |
2831 | LSSL_ALIAS(SSL_process_quic_post_handshake); | ||
2707 | 2832 | ||
2708 | int | 2833 | int |
2709 | SSL_do_handshake(SSL *s) | 2834 | SSL_do_handshake(SSL *s) |
@@ -2720,6 +2845,7 @@ SSL_do_handshake(SSL *s) | |||
2720 | 2845 | ||
2721 | return s->handshake_func(s); | 2846 | return s->handshake_func(s); |
2722 | } | 2847 | } |
2848 | LSSL_ALIAS(SSL_do_handshake); | ||
2723 | 2849 | ||
2724 | /* | 2850 | /* |
2725 | * For the next 2 functions, SSL_clear() sets shutdown and so | 2851 | * For the next 2 functions, SSL_clear() sets shutdown and so |
@@ -2734,6 +2860,7 @@ SSL_set_accept_state(SSL *s) | |||
2734 | s->handshake_func = s->method->ssl_accept; | 2860 | s->handshake_func = s->method->ssl_accept; |
2735 | ssl_clear_cipher_state(s); | 2861 | ssl_clear_cipher_state(s); |
2736 | } | 2862 | } |
2863 | LSSL_ALIAS(SSL_set_accept_state); | ||
2737 | 2864 | ||
2738 | void | 2865 | void |
2739 | SSL_set_connect_state(SSL *s) | 2866 | SSL_set_connect_state(SSL *s) |
@@ -2744,6 +2871,7 @@ SSL_set_connect_state(SSL *s) | |||
2744 | s->handshake_func = s->method->ssl_connect; | 2871 | s->handshake_func = s->method->ssl_connect; |
2745 | ssl_clear_cipher_state(s); | 2872 | ssl_clear_cipher_state(s); |
2746 | } | 2873 | } |
2874 | LSSL_ALIAS(SSL_set_connect_state); | ||
2747 | 2875 | ||
2748 | int | 2876 | int |
2749 | ssl_undefined_function(SSL *s) | 2877 | ssl_undefined_function(SSL *s) |
@@ -2792,6 +2920,7 @@ SSL_get_version(const SSL *s) | |||
2792 | { | 2920 | { |
2793 | return ssl_version_string(s->version); | 2921 | return ssl_version_string(s->version); |
2794 | } | 2922 | } |
2923 | LSSL_ALIAS(SSL_get_version); | ||
2795 | 2924 | ||
2796 | SSL * | 2925 | SSL * |
2797 | SSL_dup(SSL *s) | 2926 | SSL_dup(SSL *s) |
@@ -2915,6 +3044,7 @@ SSL_dup(SSL *s) | |||
2915 | SSL_free(ret); | 3044 | SSL_free(ret); |
2916 | return NULL; | 3045 | return NULL; |
2917 | } | 3046 | } |
3047 | LSSL_ALIAS(SSL_dup); | ||
2918 | 3048 | ||
2919 | void | 3049 | void |
2920 | ssl_clear_cipher_state(SSL *s) | 3050 | ssl_clear_cipher_state(SSL *s) |
@@ -2957,6 +3087,7 @@ SSL_get_certificate(const SSL *s) | |||
2957 | { | 3087 | { |
2958 | return (s->cert->key->x509); | 3088 | return (s->cert->key->x509); |
2959 | } | 3089 | } |
3090 | LSSL_ALIAS(SSL_get_certificate); | ||
2960 | 3091 | ||
2961 | /* Fix this function so that it takes an optional type parameter */ | 3092 | /* Fix this function so that it takes an optional type parameter */ |
2962 | EVP_PKEY * | 3093 | EVP_PKEY * |
@@ -2964,6 +3095,7 @@ SSL_get_privatekey(const SSL *s) | |||
2964 | { | 3095 | { |
2965 | return (s->cert->key->privatekey); | 3096 | return (s->cert->key->privatekey); |
2966 | } | 3097 | } |
3098 | LSSL_ALIAS(SSL_get_privatekey); | ||
2967 | 3099 | ||
2968 | const SSL_CIPHER * | 3100 | const SSL_CIPHER * |
2969 | SSL_get_current_cipher(const SSL *s) | 3101 | SSL_get_current_cipher(const SSL *s) |
@@ -2972,17 +3104,20 @@ SSL_get_current_cipher(const SSL *s) | |||
2972 | return (s->session->cipher); | 3104 | return (s->session->cipher); |
2973 | return (NULL); | 3105 | return (NULL); |
2974 | } | 3106 | } |
3107 | LSSL_ALIAS(SSL_get_current_cipher); | ||
2975 | const void * | 3108 | const void * |
2976 | SSL_get_current_compression(SSL *s) | 3109 | SSL_get_current_compression(SSL *s) |
2977 | { | 3110 | { |
2978 | return (NULL); | 3111 | return (NULL); |
2979 | } | 3112 | } |
3113 | LSSL_ALIAS(SSL_get_current_compression); | ||
2980 | 3114 | ||
2981 | const void * | 3115 | const void * |
2982 | SSL_get_current_expansion(SSL *s) | 3116 | SSL_get_current_expansion(SSL *s) |
2983 | { | 3117 | { |
2984 | return (NULL); | 3118 | return (NULL); |
2985 | } | 3119 | } |
3120 | LSSL_ALIAS(SSL_get_current_expansion); | ||
2986 | 3121 | ||
2987 | size_t | 3122 | size_t |
2988 | SSL_get_client_random(const SSL *s, unsigned char *out, size_t max_out) | 3123 | SSL_get_client_random(const SSL *s, unsigned char *out, size_t max_out) |
@@ -2999,6 +3134,7 @@ SSL_get_client_random(const SSL *s, unsigned char *out, size_t max_out) | |||
2999 | 3134 | ||
3000 | return len; | 3135 | return len; |
3001 | } | 3136 | } |
3137 | LSSL_ALIAS(SSL_get_client_random); | ||
3002 | 3138 | ||
3003 | size_t | 3139 | size_t |
3004 | SSL_get_server_random(const SSL *s, unsigned char *out, size_t max_out) | 3140 | SSL_get_server_random(const SSL *s, unsigned char *out, size_t max_out) |
@@ -3015,6 +3151,7 @@ SSL_get_server_random(const SSL *s, unsigned char *out, size_t max_out) | |||
3015 | 3151 | ||
3016 | return len; | 3152 | return len; |
3017 | } | 3153 | } |
3154 | LSSL_ALIAS(SSL_get_server_random); | ||
3018 | 3155 | ||
3019 | int | 3156 | int |
3020 | ssl_init_wbio_buffer(SSL *s, int push) | 3157 | ssl_init_wbio_buffer(SSL *s, int push) |
@@ -3069,48 +3206,56 @@ SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode) | |||
3069 | { | 3206 | { |
3070 | ctx->quiet_shutdown = mode; | 3207 | ctx->quiet_shutdown = mode; |
3071 | } | 3208 | } |
3209 | LSSL_ALIAS(SSL_CTX_set_quiet_shutdown); | ||
3072 | 3210 | ||
3073 | int | 3211 | int |
3074 | SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx) | 3212 | SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx) |
3075 | { | 3213 | { |
3076 | return (ctx->quiet_shutdown); | 3214 | return (ctx->quiet_shutdown); |
3077 | } | 3215 | } |
3216 | LSSL_ALIAS(SSL_CTX_get_quiet_shutdown); | ||
3078 | 3217 | ||
3079 | void | 3218 | void |
3080 | SSL_set_quiet_shutdown(SSL *s, int mode) | 3219 | SSL_set_quiet_shutdown(SSL *s, int mode) |
3081 | { | 3220 | { |
3082 | s->quiet_shutdown = mode; | 3221 | s->quiet_shutdown = mode; |
3083 | } | 3222 | } |
3223 | LSSL_ALIAS(SSL_set_quiet_shutdown); | ||
3084 | 3224 | ||
3085 | int | 3225 | int |
3086 | SSL_get_quiet_shutdown(const SSL *s) | 3226 | SSL_get_quiet_shutdown(const SSL *s) |
3087 | { | 3227 | { |
3088 | return (s->quiet_shutdown); | 3228 | return (s->quiet_shutdown); |
3089 | } | 3229 | } |
3230 | LSSL_ALIAS(SSL_get_quiet_shutdown); | ||
3090 | 3231 | ||
3091 | void | 3232 | void |
3092 | SSL_set_shutdown(SSL *s, int mode) | 3233 | SSL_set_shutdown(SSL *s, int mode) |
3093 | { | 3234 | { |
3094 | s->shutdown = mode; | 3235 | s->shutdown = mode; |
3095 | } | 3236 | } |
3237 | LSSL_ALIAS(SSL_set_shutdown); | ||
3096 | 3238 | ||
3097 | int | 3239 | int |
3098 | SSL_get_shutdown(const SSL *s) | 3240 | SSL_get_shutdown(const SSL *s) |
3099 | { | 3241 | { |
3100 | return (s->shutdown); | 3242 | return (s->shutdown); |
3101 | } | 3243 | } |
3244 | LSSL_ALIAS(SSL_get_shutdown); | ||
3102 | 3245 | ||
3103 | int | 3246 | int |
3104 | SSL_version(const SSL *s) | 3247 | SSL_version(const SSL *s) |
3105 | { | 3248 | { |
3106 | return (s->version); | 3249 | return (s->version); |
3107 | } | 3250 | } |
3251 | LSSL_ALIAS(SSL_version); | ||
3108 | 3252 | ||
3109 | SSL_CTX * | 3253 | SSL_CTX * |
3110 | SSL_get_SSL_CTX(const SSL *ssl) | 3254 | SSL_get_SSL_CTX(const SSL *ssl) |
3111 | { | 3255 | { |
3112 | return (ssl->ctx); | 3256 | return (ssl->ctx); |
3113 | } | 3257 | } |
3258 | LSSL_ALIAS(SSL_get_SSL_CTX); | ||
3114 | 3259 | ||
3115 | SSL_CTX * | 3260 | SSL_CTX * |
3116 | SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) | 3261 | SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) |
@@ -3133,12 +3278,14 @@ SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx) | |||
3133 | 3278 | ||
3134 | return (ssl->ctx); | 3279 | return (ssl->ctx); |
3135 | } | 3280 | } |
3281 | LSSL_ALIAS(SSL_set_SSL_CTX); | ||
3136 | 3282 | ||
3137 | int | 3283 | int |
3138 | SSL_CTX_set_default_verify_paths(SSL_CTX *ctx) | 3284 | SSL_CTX_set_default_verify_paths(SSL_CTX *ctx) |
3139 | { | 3285 | { |
3140 | return (X509_STORE_set_default_paths(ctx->cert_store)); | 3286 | return (X509_STORE_set_default_paths(ctx->cert_store)); |
3141 | } | 3287 | } |
3288 | LSSL_ALIAS(SSL_CTX_set_default_verify_paths); | ||
3142 | 3289 | ||
3143 | int | 3290 | int |
3144 | SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, | 3291 | SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, |
@@ -3146,18 +3293,21 @@ SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, | |||
3146 | { | 3293 | { |
3147 | return (X509_STORE_load_locations(ctx->cert_store, CAfile, CApath)); | 3294 | return (X509_STORE_load_locations(ctx->cert_store, CAfile, CApath)); |
3148 | } | 3295 | } |
3296 | LSSL_ALIAS(SSL_CTX_load_verify_locations); | ||
3149 | 3297 | ||
3150 | int | 3298 | int |
3151 | SSL_CTX_load_verify_mem(SSL_CTX *ctx, void *buf, int len) | 3299 | SSL_CTX_load_verify_mem(SSL_CTX *ctx, void *buf, int len) |
3152 | { | 3300 | { |
3153 | return (X509_STORE_load_mem(ctx->cert_store, buf, len)); | 3301 | return (X509_STORE_load_mem(ctx->cert_store, buf, len)); |
3154 | } | 3302 | } |
3303 | LSSL_ALIAS(SSL_CTX_load_verify_mem); | ||
3155 | 3304 | ||
3156 | void | 3305 | void |
3157 | SSL_set_info_callback(SSL *ssl, void (*cb)(const SSL *ssl, int type, int val)) | 3306 | SSL_set_info_callback(SSL *ssl, void (*cb)(const SSL *ssl, int type, int val)) |
3158 | { | 3307 | { |
3159 | ssl->info_callback = cb; | 3308 | ssl->info_callback = cb; |
3160 | } | 3309 | } |
3310 | LSSL_ALIAS(SSL_set_info_callback); | ||
3161 | 3311 | ||
3162 | void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl, int type, int val) | 3312 | void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl, int type, int val) |
3163 | { | 3313 | { |
@@ -3169,42 +3319,49 @@ SSL_state(const SSL *ssl) | |||
3169 | { | 3319 | { |
3170 | return (ssl->s3->hs.state); | 3320 | return (ssl->s3->hs.state); |
3171 | } | 3321 | } |
3322 | LSSL_ALIAS(SSL_state); | ||
3172 | 3323 | ||
3173 | void | 3324 | void |
3174 | SSL_set_state(SSL *ssl, int state) | 3325 | SSL_set_state(SSL *ssl, int state) |
3175 | { | 3326 | { |
3176 | ssl->s3->hs.state = state; | 3327 | ssl->s3->hs.state = state; |
3177 | } | 3328 | } |
3329 | LSSL_ALIAS(SSL_set_state); | ||
3178 | 3330 | ||
3179 | void | 3331 | void |
3180 | SSL_set_verify_result(SSL *ssl, long arg) | 3332 | SSL_set_verify_result(SSL *ssl, long arg) |
3181 | { | 3333 | { |
3182 | ssl->verify_result = arg; | 3334 | ssl->verify_result = arg; |
3183 | } | 3335 | } |
3336 | LSSL_ALIAS(SSL_set_verify_result); | ||
3184 | 3337 | ||
3185 | long | 3338 | long |
3186 | SSL_get_verify_result(const SSL *ssl) | 3339 | SSL_get_verify_result(const SSL *ssl) |
3187 | { | 3340 | { |
3188 | return (ssl->verify_result); | 3341 | return (ssl->verify_result); |
3189 | } | 3342 | } |
3343 | LSSL_ALIAS(SSL_get_verify_result); | ||
3190 | 3344 | ||
3191 | int | 3345 | int |
3192 | SSL_verify_client_post_handshake(SSL *ssl) | 3346 | SSL_verify_client_post_handshake(SSL *ssl) |
3193 | { | 3347 | { |
3194 | return 0; | 3348 | return 0; |
3195 | } | 3349 | } |
3350 | LSSL_ALIAS(SSL_verify_client_post_handshake); | ||
3196 | 3351 | ||
3197 | void | 3352 | void |
3198 | SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val) | 3353 | SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val) |
3199 | { | 3354 | { |
3200 | return; | 3355 | return; |
3201 | } | 3356 | } |
3357 | LSSL_ALIAS(SSL_CTX_set_post_handshake_auth); | ||
3202 | 3358 | ||
3203 | void | 3359 | void |
3204 | SSL_set_post_handshake_auth(SSL *ssl, int val) | 3360 | SSL_set_post_handshake_auth(SSL *ssl, int val) |
3205 | { | 3361 | { |
3206 | return; | 3362 | return; |
3207 | } | 3363 | } |
3364 | LSSL_ALIAS(SSL_set_post_handshake_auth); | ||
3208 | 3365 | ||
3209 | int | 3366 | int |
3210 | SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 3367 | SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
@@ -3213,18 +3370,21 @@ SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | |||
3213 | return (CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, argl, argp, | 3370 | return (CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL, argl, argp, |
3214 | new_func, dup_func, free_func)); | 3371 | new_func, dup_func, free_func)); |
3215 | } | 3372 | } |
3373 | LSSL_ALIAS(SSL_get_ex_new_index); | ||
3216 | 3374 | ||
3217 | int | 3375 | int |
3218 | SSL_set_ex_data(SSL *s, int idx, void *arg) | 3376 | SSL_set_ex_data(SSL *s, int idx, void *arg) |
3219 | { | 3377 | { |
3220 | return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); | 3378 | return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); |
3221 | } | 3379 | } |
3380 | LSSL_ALIAS(SSL_set_ex_data); | ||
3222 | 3381 | ||
3223 | void * | 3382 | void * |
3224 | SSL_get_ex_data(const SSL *s, int idx) | 3383 | SSL_get_ex_data(const SSL *s, int idx) |
3225 | { | 3384 | { |
3226 | return (CRYPTO_get_ex_data(&s->ex_data, idx)); | 3385 | return (CRYPTO_get_ex_data(&s->ex_data, idx)); |
3227 | } | 3386 | } |
3387 | LSSL_ALIAS(SSL_get_ex_data); | ||
3228 | 3388 | ||
3229 | int | 3389 | int |
3230 | SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 3390 | SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
@@ -3233,18 +3393,21 @@ SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | |||
3233 | return (CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, argl, argp, | 3393 | return (CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, argl, argp, |
3234 | new_func, dup_func, free_func)); | 3394 | new_func, dup_func, free_func)); |
3235 | } | 3395 | } |
3396 | LSSL_ALIAS(SSL_CTX_get_ex_new_index); | ||
3236 | 3397 | ||
3237 | int | 3398 | int |
3238 | SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg) | 3399 | SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg) |
3239 | { | 3400 | { |
3240 | return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); | 3401 | return (CRYPTO_set_ex_data(&s->ex_data, idx, arg)); |
3241 | } | 3402 | } |
3403 | LSSL_ALIAS(SSL_CTX_set_ex_data); | ||
3242 | 3404 | ||
3243 | void * | 3405 | void * |
3244 | SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) | 3406 | SSL_CTX_get_ex_data(const SSL_CTX *s, int idx) |
3245 | { | 3407 | { |
3246 | return (CRYPTO_get_ex_data(&s->ex_data, idx)); | 3408 | return (CRYPTO_get_ex_data(&s->ex_data, idx)); |
3247 | } | 3409 | } |
3410 | LSSL_ALIAS(SSL_CTX_get_ex_data); | ||
3248 | 3411 | ||
3249 | int | 3412 | int |
3250 | ssl_ok(SSL *s) | 3413 | ssl_ok(SSL *s) |
@@ -3257,6 +3420,7 @@ SSL_CTX_get_cert_store(const SSL_CTX *ctx) | |||
3257 | { | 3420 | { |
3258 | return (ctx->cert_store); | 3421 | return (ctx->cert_store); |
3259 | } | 3422 | } |
3423 | LSSL_ALIAS(SSL_CTX_get_cert_store); | ||
3260 | 3424 | ||
3261 | void | 3425 | void |
3262 | SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store) | 3426 | SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store) |
@@ -3264,6 +3428,7 @@ SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *store) | |||
3264 | X509_STORE_free(ctx->cert_store); | 3428 | X509_STORE_free(ctx->cert_store); |
3265 | ctx->cert_store = store; | 3429 | ctx->cert_store = store; |
3266 | } | 3430 | } |
3431 | LSSL_ALIAS(SSL_CTX_set_cert_store); | ||
3267 | 3432 | ||
3268 | X509 * | 3433 | X509 * |
3269 | SSL_CTX_get0_certificate(const SSL_CTX *ctx) | 3434 | SSL_CTX_get0_certificate(const SSL_CTX *ctx) |
@@ -3273,6 +3438,7 @@ SSL_CTX_get0_certificate(const SSL_CTX *ctx) | |||
3273 | 3438 | ||
3274 | return ctx->cert->key->x509; | 3439 | return ctx->cert->key->x509; |
3275 | } | 3440 | } |
3441 | LSSL_ALIAS(SSL_CTX_get0_certificate); | ||
3276 | 3442 | ||
3277 | EVP_PKEY * | 3443 | EVP_PKEY * |
3278 | SSL_CTX_get0_privatekey(const SSL_CTX *ctx) | 3444 | SSL_CTX_get0_privatekey(const SSL_CTX *ctx) |
@@ -3282,12 +3448,14 @@ SSL_CTX_get0_privatekey(const SSL_CTX *ctx) | |||
3282 | 3448 | ||
3283 | return ctx->cert->key->privatekey; | 3449 | return ctx->cert->key->privatekey; |
3284 | } | 3450 | } |
3451 | LSSL_ALIAS(SSL_CTX_get0_privatekey); | ||
3285 | 3452 | ||
3286 | int | 3453 | int |
3287 | SSL_want(const SSL *s) | 3454 | SSL_want(const SSL *s) |
3288 | { | 3455 | { |
3289 | return (s->rwstate); | 3456 | return (s->rwstate); |
3290 | } | 3457 | } |
3458 | LSSL_ALIAS(SSL_want); | ||
3291 | 3459 | ||
3292 | void | 3460 | void |
3293 | SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, | 3461 | SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, |
@@ -3295,6 +3463,7 @@ SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx, RSA *(*cb)(SSL *ssl, int is_export, | |||
3295 | { | 3463 | { |
3296 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); | 3464 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); |
3297 | } | 3465 | } |
3466 | LSSL_ALIAS(SSL_CTX_set_tmp_rsa_callback); | ||
3298 | 3467 | ||
3299 | void | 3468 | void |
3300 | SSL_set_tmp_rsa_callback(SSL *ssl, RSA *(*cb)(SSL *ssl, int is_export, | 3469 | SSL_set_tmp_rsa_callback(SSL *ssl, RSA *(*cb)(SSL *ssl, int is_export, |
@@ -3302,6 +3471,7 @@ SSL_set_tmp_rsa_callback(SSL *ssl, RSA *(*cb)(SSL *ssl, int is_export, | |||
3302 | { | 3471 | { |
3303 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); | 3472 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_RSA_CB,(void (*)(void))cb); |
3304 | } | 3473 | } |
3474 | LSSL_ALIAS(SSL_set_tmp_rsa_callback); | ||
3305 | 3475 | ||
3306 | void | 3476 | void |
3307 | SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*dh)(SSL *ssl, int is_export, | 3477 | SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*dh)(SSL *ssl, int is_export, |
@@ -3309,6 +3479,7 @@ SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*dh)(SSL *ssl, int is_export, | |||
3309 | { | 3479 | { |
3310 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_DH_CB,(void (*)(void))dh); | 3480 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_DH_CB,(void (*)(void))dh); |
3311 | } | 3481 | } |
3482 | LSSL_ALIAS(SSL_CTX_set_tmp_dh_callback); | ||
3312 | 3483 | ||
3313 | void | 3484 | void |
3314 | SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh)(SSL *ssl, int is_export, | 3485 | SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh)(SSL *ssl, int is_export, |
@@ -3316,6 +3487,7 @@ SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh)(SSL *ssl, int is_export, | |||
3316 | { | 3487 | { |
3317 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_DH_CB,(void (*)(void))dh); | 3488 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_DH_CB,(void (*)(void))dh); |
3318 | } | 3489 | } |
3490 | LSSL_ALIAS(SSL_set_tmp_dh_callback); | ||
3319 | 3491 | ||
3320 | void | 3492 | void |
3321 | SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, EC_KEY *(*ecdh)(SSL *ssl, | 3493 | SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, EC_KEY *(*ecdh)(SSL *ssl, |
@@ -3324,6 +3496,7 @@ SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx, EC_KEY *(*ecdh)(SSL *ssl, | |||
3324 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_ECDH_CB, | 3496 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TMP_ECDH_CB, |
3325 | (void (*)(void))ecdh); | 3497 | (void (*)(void))ecdh); |
3326 | } | 3498 | } |
3499 | LSSL_ALIAS(SSL_CTX_set_tmp_ecdh_callback); | ||
3327 | 3500 | ||
3328 | void | 3501 | void |
3329 | SSL_set_tmp_ecdh_callback(SSL *ssl, EC_KEY *(*ecdh)(SSL *ssl, int is_export, | 3502 | SSL_set_tmp_ecdh_callback(SSL *ssl, EC_KEY *(*ecdh)(SSL *ssl, int is_export, |
@@ -3331,6 +3504,7 @@ SSL_set_tmp_ecdh_callback(SSL *ssl, EC_KEY *(*ecdh)(SSL *ssl, int is_export, | |||
3331 | { | 3504 | { |
3332 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_ECDH_CB,(void (*)(void))ecdh); | 3505 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_ECDH_CB,(void (*)(void))ecdh); |
3333 | } | 3506 | } |
3507 | LSSL_ALIAS(SSL_set_tmp_ecdh_callback); | ||
3334 | 3508 | ||
3335 | 3509 | ||
3336 | void | 3510 | void |
@@ -3340,6 +3514,7 @@ SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, | |||
3340 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_MSG_CALLBACK, | 3514 | SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_MSG_CALLBACK, |
3341 | (void (*)(void))cb); | 3515 | (void (*)(void))cb); |
3342 | } | 3516 | } |
3517 | LSSL_ALIAS(SSL_CTX_set_msg_callback); | ||
3343 | 3518 | ||
3344 | void | 3519 | void |
3345 | SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, | 3520 | SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, |
@@ -3347,24 +3522,28 @@ SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, | |||
3347 | { | 3522 | { |
3348 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)(void))cb); | 3523 | SSL_callback_ctrl(ssl, SSL_CTRL_SET_MSG_CALLBACK, (void (*)(void))cb); |
3349 | } | 3524 | } |
3525 | LSSL_ALIAS(SSL_set_msg_callback); | ||
3350 | 3526 | ||
3351 | void | 3527 | void |
3352 | SSL_set_debug(SSL *s, int debug) | 3528 | SSL_set_debug(SSL *s, int debug) |
3353 | { | 3529 | { |
3354 | s->debug = debug; | 3530 | s->debug = debug; |
3355 | } | 3531 | } |
3532 | LSSL_ALIAS(SSL_set_debug); | ||
3356 | 3533 | ||
3357 | int | 3534 | int |
3358 | SSL_cache_hit(SSL *s) | 3535 | SSL_cache_hit(SSL *s) |
3359 | { | 3536 | { |
3360 | return (s->hit); | 3537 | return (s->hit); |
3361 | } | 3538 | } |
3539 | LSSL_ALIAS(SSL_cache_hit); | ||
3362 | 3540 | ||
3363 | int | 3541 | int |
3364 | SSL_CTX_get_min_proto_version(SSL_CTX *ctx) | 3542 | SSL_CTX_get_min_proto_version(SSL_CTX *ctx) |
3365 | { | 3543 | { |
3366 | return ctx->min_proto_version; | 3544 | return ctx->min_proto_version; |
3367 | } | 3545 | } |
3546 | LSSL_ALIAS(SSL_CTX_get_min_proto_version); | ||
3368 | 3547 | ||
3369 | int | 3548 | int |
3370 | SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version) | 3549 | SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version) |
@@ -3373,12 +3552,14 @@ SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version) | |||
3373 | ctx->max_tls_version, &ctx->min_tls_version, | 3552 | ctx->max_tls_version, &ctx->min_tls_version, |
3374 | &ctx->min_proto_version); | 3553 | &ctx->min_proto_version); |
3375 | } | 3554 | } |
3555 | LSSL_ALIAS(SSL_CTX_set_min_proto_version); | ||
3376 | 3556 | ||
3377 | int | 3557 | int |
3378 | SSL_CTX_get_max_proto_version(SSL_CTX *ctx) | 3558 | SSL_CTX_get_max_proto_version(SSL_CTX *ctx) |
3379 | { | 3559 | { |
3380 | return ctx->max_proto_version; | 3560 | return ctx->max_proto_version; |
3381 | } | 3561 | } |
3562 | LSSL_ALIAS(SSL_CTX_get_max_proto_version); | ||
3382 | 3563 | ||
3383 | int | 3564 | int |
3384 | SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version) | 3565 | SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version) |
@@ -3387,12 +3568,14 @@ SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version) | |||
3387 | ctx->min_tls_version, &ctx->max_tls_version, | 3568 | ctx->min_tls_version, &ctx->max_tls_version, |
3388 | &ctx->max_proto_version); | 3569 | &ctx->max_proto_version); |
3389 | } | 3570 | } |
3571 | LSSL_ALIAS(SSL_CTX_set_max_proto_version); | ||
3390 | 3572 | ||
3391 | int | 3573 | int |
3392 | SSL_get_min_proto_version(SSL *ssl) | 3574 | SSL_get_min_proto_version(SSL *ssl) |
3393 | { | 3575 | { |
3394 | return ssl->min_proto_version; | 3576 | return ssl->min_proto_version; |
3395 | } | 3577 | } |
3578 | LSSL_ALIAS(SSL_get_min_proto_version); | ||
3396 | 3579 | ||
3397 | int | 3580 | int |
3398 | SSL_set_min_proto_version(SSL *ssl, uint16_t version) | 3581 | SSL_set_min_proto_version(SSL *ssl, uint16_t version) |
@@ -3401,11 +3584,13 @@ SSL_set_min_proto_version(SSL *ssl, uint16_t version) | |||
3401 | ssl->max_tls_version, &ssl->min_tls_version, | 3584 | ssl->max_tls_version, &ssl->min_tls_version, |
3402 | &ssl->min_proto_version); | 3585 | &ssl->min_proto_version); |
3403 | } | 3586 | } |
3587 | LSSL_ALIAS(SSL_set_min_proto_version); | ||
3404 | int | 3588 | int |
3405 | SSL_get_max_proto_version(SSL *ssl) | 3589 | SSL_get_max_proto_version(SSL *ssl) |
3406 | { | 3590 | { |
3407 | return ssl->max_proto_version; | 3591 | return ssl->max_proto_version; |
3408 | } | 3592 | } |
3593 | LSSL_ALIAS(SSL_get_max_proto_version); | ||
3409 | 3594 | ||
3410 | int | 3595 | int |
3411 | SSL_set_max_proto_version(SSL *ssl, uint16_t version) | 3596 | SSL_set_max_proto_version(SSL *ssl, uint16_t version) |
@@ -3414,42 +3599,49 @@ SSL_set_max_proto_version(SSL *ssl, uint16_t version) | |||
3414 | ssl->min_tls_version, &ssl->max_tls_version, | 3599 | ssl->min_tls_version, &ssl->max_tls_version, |
3415 | &ssl->max_proto_version); | 3600 | &ssl->max_proto_version); |
3416 | } | 3601 | } |
3602 | LSSL_ALIAS(SSL_set_max_proto_version); | ||
3417 | 3603 | ||
3418 | const SSL_METHOD * | 3604 | const SSL_METHOD * |
3419 | SSL_CTX_get_ssl_method(const SSL_CTX *ctx) | 3605 | SSL_CTX_get_ssl_method(const SSL_CTX *ctx) |
3420 | { | 3606 | { |
3421 | return ctx->method; | 3607 | return ctx->method; |
3422 | } | 3608 | } |
3609 | LSSL_ALIAS(SSL_CTX_get_ssl_method); | ||
3423 | 3610 | ||
3424 | int | 3611 | int |
3425 | SSL_CTX_get_security_level(const SSL_CTX *ctx) | 3612 | SSL_CTX_get_security_level(const SSL_CTX *ctx) |
3426 | { | 3613 | { |
3427 | return ctx->cert->security_level; | 3614 | return ctx->cert->security_level; |
3428 | } | 3615 | } |
3616 | LSSL_ALIAS(SSL_CTX_get_security_level); | ||
3429 | 3617 | ||
3430 | void | 3618 | void |
3431 | SSL_CTX_set_security_level(SSL_CTX *ctx, int level) | 3619 | SSL_CTX_set_security_level(SSL_CTX *ctx, int level) |
3432 | { | 3620 | { |
3433 | ctx->cert->security_level = level; | 3621 | ctx->cert->security_level = level; |
3434 | } | 3622 | } |
3623 | LSSL_ALIAS(SSL_CTX_set_security_level); | ||
3435 | 3624 | ||
3436 | int | 3625 | int |
3437 | SSL_get_security_level(const SSL *ssl) | 3626 | SSL_get_security_level(const SSL *ssl) |
3438 | { | 3627 | { |
3439 | return ssl->cert->security_level; | 3628 | return ssl->cert->security_level; |
3440 | } | 3629 | } |
3630 | LSSL_ALIAS(SSL_get_security_level); | ||
3441 | 3631 | ||
3442 | void | 3632 | void |
3443 | SSL_set_security_level(SSL *ssl, int level) | 3633 | SSL_set_security_level(SSL *ssl, int level) |
3444 | { | 3634 | { |
3445 | ssl->cert->security_level = level; | 3635 | ssl->cert->security_level = level; |
3446 | } | 3636 | } |
3637 | LSSL_ALIAS(SSL_set_security_level); | ||
3447 | 3638 | ||
3448 | int | 3639 | int |
3449 | SSL_is_quic(const SSL *ssl) | 3640 | SSL_is_quic(const SSL *ssl) |
3450 | { | 3641 | { |
3451 | return ssl->quic_method != NULL; | 3642 | return ssl->quic_method != NULL; |
3452 | } | 3643 | } |
3644 | LSSL_ALIAS(SSL_is_quic); | ||
3453 | 3645 | ||
3454 | int | 3646 | int |
3455 | SSL_set_quic_transport_params(SSL *ssl, const uint8_t *params, | 3647 | SSL_set_quic_transport_params(SSL *ssl, const uint8_t *params, |
@@ -3468,6 +3660,7 @@ SSL_set_quic_transport_params(SSL *ssl, const uint8_t *params, | |||
3468 | 3660 | ||
3469 | return 1; | 3661 | return 1; |
3470 | } | 3662 | } |
3663 | LSSL_ALIAS(SSL_set_quic_transport_params); | ||
3471 | 3664 | ||
3472 | void | 3665 | void |
3473 | SSL_get_peer_quic_transport_params(const SSL *ssl, const uint8_t **out_params, | 3666 | SSL_get_peer_quic_transport_params(const SSL *ssl, const uint8_t **out_params, |
@@ -3476,12 +3669,14 @@ SSL_get_peer_quic_transport_params(const SSL *ssl, const uint8_t **out_params, | |||
3476 | *out_params = ssl->s3->peer_quic_transport_params; | 3669 | *out_params = ssl->s3->peer_quic_transport_params; |
3477 | *out_params_len = ssl->s3->peer_quic_transport_params_len; | 3670 | *out_params_len = ssl->s3->peer_quic_transport_params_len; |
3478 | } | 3671 | } |
3672 | LSSL_ALIAS(SSL_get_peer_quic_transport_params); | ||
3479 | 3673 | ||
3480 | void | 3674 | void |
3481 | SSL_set_quic_use_legacy_codepoint(SSL *ssl, int use_legacy) | 3675 | SSL_set_quic_use_legacy_codepoint(SSL *ssl, int use_legacy) |
3482 | { | 3676 | { |
3483 | /* Not supported. */ | 3677 | /* Not supported. */ |
3484 | } | 3678 | } |
3679 | LSSL_ALIAS(SSL_set_quic_use_legacy_codepoint); | ||
3485 | 3680 | ||
3486 | static int | 3681 | static int |
3487 | ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) | 3682 | ssl_cipher_id_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) |