|
28 | 28 | #include "session_server_ch.h" |
29 | 29 | #include "libnetconf.h" |
30 | 30 |
|
| 31 | +#if OPENSSL_VERSION_NUMBER < 0x10100000L |
| 32 | +#define X509_STORE_CTX_get_by_subject X509_STORE_get_by_subject |
| 33 | +#endif |
| 34 | + |
31 | 35 | struct nc_server_tls_opts tls_ch_opts; |
32 | 36 | pthread_mutex_t tls_ch_opts_lock = PTHREAD_MUTEX_INITIALIZER; |
33 | 37 | extern struct nc_server_opts server_opts; |
@@ -563,7 +567,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx) |
563 | 567 | store_ctx = X509_STORE_CTX_new(); |
564 | 568 | obj = X509_OBJECT_new(); |
565 | 569 | X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL); |
566 | | - rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, subject, obj); |
| 570 | + rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, subject, obj); |
567 | 571 | X509_STORE_CTX_free(store_ctx); |
568 | 572 | crl = X509_OBJECT_get0_X509_CRL(obj); |
569 | 573 | if (rc > 0 && crl) { |
@@ -616,7 +620,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx) |
616 | 620 | store_ctx = X509_STORE_CTX_new(); |
617 | 621 | obj = X509_OBJECT_new(); |
618 | 622 | X509_STORE_CTX_init(store_ctx, opts->crl_store, NULL, NULL); |
619 | | - rc = X509_STORE_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj); |
| 623 | + rc = X509_STORE_CTX_get_by_subject(store_ctx, X509_LU_CRL, issuer, obj); |
620 | 624 | X509_STORE_CTX_free(store_ctx); |
621 | 625 | crl = X509_OBJECT_get0_X509_CRL(obj); |
622 | 626 | if (rc > 0 && crl) { |
@@ -776,7 +780,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx) |
776 | 780 | * the current certificate in order to verify it's integrity */ |
777 | 781 | memset((char *)&obj, 0, sizeof(obj)); |
778 | 782 | X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL); |
779 | | - rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj); |
| 783 | + rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, subject, &obj); |
780 | 784 | X509_STORE_CTX_cleanup(&store_ctx); |
781 | 785 | crl = obj.data.crl; |
782 | 786 | if (rc > 0 && crl) { |
@@ -828,7 +832,7 @@ nc_tlsclb_verify(int preverify_ok, X509_STORE_CTX *x509_ctx) |
828 | 832 | * the current certificate in order to check for revocation */ |
829 | 833 | memset((char *)&obj, 0, sizeof(obj)); |
830 | 834 | X509_STORE_CTX_init(&store_ctx, opts->crl_store, NULL, NULL); |
831 | | - rc = X509_STORE_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj); |
| 835 | + rc = X509_STORE_CTX_get_by_subject(&store_ctx, X509_LU_CRL, issuer, &obj); |
832 | 836 | X509_STORE_CTX_cleanup(&store_ctx); |
833 | 837 | crl = obj.data.crl; |
834 | 838 | if (rc > 0 && crl) { |
|
0 commit comments