Lines Matching refs:NULL
277 return NULL; in tlsext_ticket_key_get()
294 return NULL; in tlsext_ticket_key_find()
332 if (NULL == k) in ssl_tlsext_ticket_key_cb()
337 EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, k->tick_aes_key, iv); in ssl_tlsext_ticket_key_cb()
340 EVP_sha256(), NULL); in ssl_tlsext_ticket_key_cb()
356 if (NULL == k) in ssl_tlsext_ticket_key_cb()
360 EVP_sha256(), NULL); in ssl_tlsext_ticket_key_cb()
371 EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, k->tick_aes_key, iv); in ssl_tlsext_ticket_key_cb()
414 if (0 != fdevent_load_file_bytes((char *)buf,(off_t)sizeof(buf),0,fn,NULL)) in mod_openssl_session_ticket_key_file()
471 if (NULL == hctx->conf.pc) return SSL_TLSEXT_ERR_NOACK;/*should not happen*/ in ssl_tlsext_status_cb()
473 if (NULL == ssl_stapling) return SSL_TLSEXT_ERR_NOACK; in ssl_tlsext_status_cb()
480 if (NULL == ocsp_resp) in ssl_tlsext_status_cb()
487 hctx->r->uri.authority.ptr, ERR_error_string(ERR_get_error(), NULL)); in ssl_tlsext_status_cb()
513 |OPENSSL_INIT_LOAD_CRYPTO_STRINGS,NULL); in mod_openssl_init_once_openssl()
516 |OPENSSL_INIT_LOAD_CONFIG, NULL); in mod_openssl_init_once_openssl()
552 ERR_remove_thread_state(NULL); in mod_openssl_free_openssl()
569 if (NULL != p->ssl_ctxs) { in mod_openssl_free_config()
583 if (NULL == p->cvlist) return; in mod_openssl_free_config()
640 const unsigned char *p = NULL; in PEM_ASN1_read_bio_secmem()
641 unsigned char *data = NULL; in PEM_ASN1_read_bio_secmem()
643 char *ret = NULL; in PEM_ASN1_read_bio_secmem()
648 if (!PEM_bytes_read_bio_secmem(&data, &len, NULL, name, bp, cb, u)) in PEM_ASN1_read_bio_secmem()
650 if (!PEM_bytes_read_bio(&data, &len, NULL, name, bp, cb, u)) in PEM_ASN1_read_bio_secmem()
652 return NULL; in PEM_ASN1_read_bio_secmem()
656 if (ret == NULL) in PEM_ASN1_read_bio_secmem()
695 STACK_OF(X509) *chain_sk = NULL; in mod_openssl_load_X509_sk()
696 for (X509 *ca; (ca = PEM_read_bio_X509_secmem(in,NULL,NULL,NULL)); ) { in mod_openssl_load_X509_sk()
697 if (NULL == chain_sk) /*(allocate only if it will not be empty)*/ in mod_openssl_load_X509_sk()
715 X509_STORE *chain_store = NULL; in mod_openssl_load_X509_STORE()
716 for (X509 *ca; (ca = PEM_read_bio_X509(in,NULL,NULL,NULL)); X509_free(ca)) { in mod_openssl_load_X509_STORE()
717 if (NULL == chain_store) /*(allocate only if it will not be empty)*/ in mod_openssl_load_X509_STORE()
737 if (NULL == in) { in mod_openssl_load_cacerts()
740 return NULL; in mod_openssl_load_cacerts()
747 return NULL; in mod_openssl_load_cacerts()
750 X509_STORE *chain_store = NULL; in mod_openssl_load_cacerts()
753 return NULL; in mod_openssl_load_cacerts()
758 if (NULL == chain_store) { in mod_openssl_load_cacerts()
761 return NULL; in mod_openssl_load_cacerts()
769 if (NULL == cacerts->names) { in mod_openssl_load_cacerts()
772 return NULL; in mod_openssl_load_cacerts()
786 if (1 != X509_STORE_load_locations(store, ssl_ca_crl_file->ptr, NULL)) in mod_openssl_load_cacrls()
790 "SSL: %s %s", ERR_error_string(ERR_get_error(), NULL), in mod_openssl_load_cacrls()
805 if (1 == SSL_CTX_load_verify_locations(ssl_ctx, fn, NULL)) in mod_openssl_load_verify_locn()
809 "SSL: %s %s", ERR_error_string(ERR_get_error(), NULL), fn); in mod_openssl_load_verify_locn()
832 if (NULL == p->srv) return; in FREE_FUNC()
998 if (preverify_ok && 0 == depth && NULL != hctx->conf.ssl_ca_dn_file) { in verify_callback()
1008 if (NULL == err_cert) return !hctx->conf.ssl_verifyclient_enforce; in verify_callback()
1034 if (NULL == err_cert) return !hctx->conf.ssl_verifyclient_enforce; in verify_callback()
1069 if (!pc || NULL == pc->ssl_pemfile_x509 || NULL == pc->ssl_pemfile_pkey) { in mod_openssl_cert_cb()
1084 hctx->r->uri.authority.ptr, ERR_error_string(ERR_get_error(), NULL)); in mod_openssl_cert_cb()
1110 ERR_error_string(ERR_get_error(), NULL)); in mod_openssl_cert_cb()
1114 STACK_OF(X509) *chain = NULL; in mod_openssl_cert_cb()
1117 SSL_set1_chain_cert_store(ssl, NULL); in mod_openssl_cert_cb()
1126 hctx->r->uri.authority.ptr, ERR_error_string(ERR_get_error(), NULL)); in mod_openssl_cert_cb()
1134 if (NULL != ocsp_resp in mod_openssl_cert_cb()
1138 hctx->r->uri.authority.ptr, ERR_error_string(ERR_get_error(), NULL)); in mod_openssl_cert_cb()
1145 if (NULL == hctx->conf.ssl_ca_file) { in mod_openssl_cert_cb()
1171 SSL_set_verify(ssl, SSL_VERIFY_NONE, NULL); in mod_openssl_cert_cb()
1210 return (mod_openssl_cert_cb(hctx->ssl, NULL) == 1) in mod_openssl_SNI()
1256 if (NULL == servername) in network_ssl_servername_callback()
1307 *chain = NULL; in mod_openssl_load_pem_file()
1311 if (NULL == data) return NULL; in mod_openssl_load_pem_file()
1314 if (NULL == in) { in mod_openssl_load_pem_file()
1319 return NULL; in mod_openssl_load_pem_file()
1322 int is_pem = (NULL != strstr(data, "-----")); in mod_openssl_load_pem_file()
1324 ? PEM_read_bio_X509_AUX_secmem(in, NULL, NULL, NULL) in mod_openssl_load_pem_file()
1325 : d2i_X509_bio(in, NULL); in mod_openssl_load_pem_file()
1326 if (NULL == x) { in mod_openssl_load_pem_file()
1332 x = NULL; in mod_openssl_load_pem_file()
1351 if (NULL == data) return NULL; in mod_openssl_evp_pkey_load_pem_file()
1352 EVP_PKEY *x = NULL; in mod_openssl_evp_pkey_load_pem_file()
1354 if (NULL != in) { in mod_openssl_evp_pkey_load_pem_file()
1355 x = (NULL != strstr(data, "-----")) in mod_openssl_evp_pkey_load_pem_file()
1356 ? PEM_read_bio_PrivateKey(in, NULL, NULL, NULL) in mod_openssl_evp_pkey_load_pem_file()
1357 : d2i_PrivateKey_bio(in, NULL); in mod_openssl_evp_pkey_load_pem_file()
1363 if (NULL == in) in mod_openssl_evp_pkey_load_pem_file()
1366 else if (NULL == x) in mod_openssl_evp_pkey_load_pem_file()
1398 if (NULL == data) return NULL; in mod_openssl_load_stapling_file()
1402 if (NULL == b) in mod_openssl_load_stapling_file()
1414 if (NULL == in) { in mod_openssl_load_stapling_file()
1418 return NULL; in mod_openssl_load_stapling_file()
1421 OCSP_RESPONSE *x = d2i_OCSP_RESPONSE_bio(in, NULL); in mod_openssl_load_stapling_file()
1424 if (NULL == x) { in mod_openssl_load_stapling_file()
1427 ERR_error_string(ERR_get_error(), NULL), file); in mod_openssl_load_stapling_file()
1428 return NULL; in mod_openssl_load_stapling_file()
1431 unsigned char *rspder = NULL; in mod_openssl_load_stapling_file()
1435 if (NULL == b) b = buffer_init(); in mod_openssl_load_stapling_file()
1441 return rspderlen ? b : NULL; in mod_openssl_load_stapling_file()
1458 if (NULL == asn1time || NULL == asn1time->data) return -1; in mod_openssl_asn1_time_to_posix()
1525 return ASN1_TIME_diff(&day, &sec, NULL, asn1time) in mod_openssl_asn1_time_to_posix()
1542 OCSP_RESPONSE *ocsp = d2i_OCSP_RESPONSE(NULL, &p, buffer_clen(der)); in mod_openssl_ocsp_next_update()
1543 if (NULL == ocsp) return -1; in mod_openssl_ocsp_next_update()
1545 if (NULL == bs) { in mod_openssl_ocsp_next_update()
1551 ASN1_TIME *nextupd = NULL; in mod_openssl_ocsp_next_update()
1552 OCSP_single_get0_status(OCSP_resp_get0(bs, 0), NULL, NULL, NULL, &nextupd); in mod_openssl_ocsp_next_update()
1571 if (NULL == pc->ssl_stapling) /*(previously discarded or never loaded)*/ in mod_openssl_expire_stapling_file()
1576 pc->ssl_stapling = NULL; in mod_openssl_expire_stapling_file()
1633 if (NULL == p->cvlist) return; in mod_openssl_refresh_stapling_files()
1659 TLS_FEATURE *tlsf = X509_get_ext_d2i(crt, NID_tlsfeature, NULL, NULL); in mod_openssl_crt_must_staple()
1660 if (NULL == tlsf) return 0; in mod_openssl_crt_must_staple()
1684 if (!mod_openssl_init_once_openssl(srv)) return NULL; in network_openssl_load_pemfile()
1686 STACK_OF(X509) *ssl_pemfile_chain = NULL; in network_openssl_load_pemfile()
1689 if (NULL == ssl_pemfile_x509) in network_openssl_load_pemfile()
1690 return NULL; in network_openssl_load_pemfile()
1694 if (NULL == ssl_pemfile_pkey) { in network_openssl_load_pemfile()
1697 return NULL; in network_openssl_load_pemfile()
1703 "reason: %s %s %s", ERR_error_string(ERR_get_error(), NULL), in network_openssl_load_pemfile()
1708 return NULL; in network_openssl_load_pemfile()
1717 pc->ssl_stapling = NULL; in network_openssl_load_pemfile()
1766 X509 *ssl_pemfile_x509 = NULL; in mod_openssl_acme_tls_1()
1767 STACK_OF(X509) *ssl_pemfile_chain = NULL; in mod_openssl_acme_tls_1()
1768 EVP_PKEY *ssl_pemfile_pkey = NULL; in mod_openssl_acme_tls_1()
1780 if (NULL != strchr(name->ptr, '/')) return rc; in mod_openssl_acme_tls_1()
1794 if (NULL == ssl_pemfile_x509) { in mod_openssl_acme_tls_1()
1803 if (NULL == ssl_pemfile_pkey) { in mod_openssl_acme_tls_1()
1814 ERR_error_string(ERR_get_error(), NULL), b->ptr); in mod_openssl_acme_tls_1()
1824 "name %s: %s", name->ptr, ERR_error_string(ERR_get_error(),NULL)); in mod_openssl_acme_tls_1()
1830 ssl_pemfile_chain = NULL; in mod_openssl_acme_tls_1()
1836 "name %s: %s", name->ptr, ERR_error_string(ERR_get_error(),NULL)); in mod_openssl_acme_tls_1()
1841 SSL_set_verify(ssl, SSL_VERIFY_NONE, NULL); in mod_openssl_acme_tls_1()
1889 if (hctx->r->handler_module == NULL)/*(e.g. not mod_sockproxy)*/ in mod_openssl_alpn_select_cb()
1967 if (NULL != ds) { in network_openssl_ssl_conf_cmd()
1991 ERR_error_string(ERR_get_error(), NULL)); in network_openssl_ssl_conf_cmd()
2000 ERR_error_string(ERR_get_error(), NULL)); in network_openssl_ssl_conf_cmd()
2028 #define DH_set0_pqg(dh, dh_p, NULL, dh_g) \ argument
2029 ((dh)->p = (dh_p), (dh)->g = (dh_g), (dh_p) != NULL && (dh_g) != NULL)
2073 if (dh == NULL) in get_dh2048()
2074 return NULL; in get_dh2048()
2075 p = BN_bin2bn(dhp_2048, sizeof(dhp_2048), NULL); in get_dh2048()
2076 g = BN_bin2bn(dhg_2048, sizeof(dhg_2048), NULL); in get_dh2048()
2077 if (p == NULL || g == NULL || !DH_set0_pqg(dh, p, NULL, g)) { in get_dh2048()
2081 return NULL; in get_dh2048()
2100 if (bio == NULL) { in mod_openssl_ssl_conf_dhparameters()
2105 dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); in mod_openssl_ssl_conf_dhparameters()
2107 if (dh == NULL) { in mod_openssl_ssl_conf_dhparameters()
2117 if (dh == NULL) { in mod_openssl_ssl_conf_dhparameters()
2128 EVP_PKEY *dhpkey = NULL; in mod_openssl_ssl_conf_dhparameters()
2130 OSSL_STORE_CTX *ctx = NULL; in mod_openssl_ssl_conf_dhparameters()
2131 ctx = OSSL_STORE_open(dhparameters->ptr, NULL, NULL, NULL, NULL); in mod_openssl_ssl_conf_dhparameters()
2132 if (NULL != ctx) { in mod_openssl_ssl_conf_dhparameters()
2150 dhpkey = NULL; in mod_openssl_ssl_conf_dhparameters()
2153 if (NULL == dhpkey) in mod_openssl_ssl_conf_dhparameters()
2206 if (ecdh == NULL) { in mod_openssl_ssl_conf_curves()
2255 if (NULL == s->ssl_ctx) { in network_init_ssl()
2257 "SSL: %s", ERR_error_string(ERR_get_error(), NULL)); in network_init_ssl()
2274 ERR_error_string(ERR_get_error(), NULL)); in network_init_ssl()
2296 "SSL: %s", ERR_error_string(ERR_get_error(), NULL)); in network_init_ssl()
2307 "SSL: %s", ERR_error_string(ERR_get_error(), NULL)); in network_init_ssl()
2316 "SSL: %s", ERR_error_string(ERR_get_error(), NULL)); in network_init_ssl()
2330 if (!mod_openssl_ssl_conf_dhparameters(srv, s, NULL)) in network_init_ssl()
2351 SSL_CTX_set_cert_cb(s->ssl_ctx, mod_openssl_cert_cb, NULL); in network_init_ssl()
2374 if (NULL == s->ssl_ca_file) { in network_init_ssl()
2406 "SSL: %s %s", ERR_error_string(ERR_get_error(), NULL), in network_init_ssl()
2413 "SSL: %s %s %s", ERR_error_string(ERR_get_error(), NULL), in network_init_ssl()
2421 "reason: %s %s %s", ERR_error_string(ERR_get_error(), NULL), in network_init_ssl()
2453 SSL_CTX_set_alpn_select_cb(s->ssl_ctx,mod_openssl_alpn_select_cb,NULL); in network_init_ssl()
2498 ,{ NULL, 0, in mod_openssl_set_defaults_sockets()
2637 if (NULL == conf.pc) { in mod_openssl_set_defaults_sockets()
2646 || (conf.ssl_enabled && NULL == p->ssl_ctxs[0].ssl_ctx)) { in mod_openssl_set_defaults_sockets()
2745 ,{ NULL, 0, in SETDEFAULTS_FUNC()
2756 const buffer *default_ssl_ca_crl_file = NULL; in SETDEFAULTS_FUNC()
2762 config_plugin_value_t *pemfile = NULL; in SETDEFAULTS_FUNC()
2763 config_plugin_value_t *privkey = NULL; in SETDEFAULTS_FUNC()
2764 const buffer *ssl_stapling_file = NULL; in SETDEFAULTS_FUNC()
2765 const buffer *ssl_ca_file = NULL; in SETDEFAULTS_FUNC()
2766 const buffer *ssl_ca_dn_file = NULL; in SETDEFAULTS_FUNC()
2767 const buffer *ssl_ca_crl_file = NULL; in SETDEFAULTS_FUNC()
2768 X509_STORE *ca_store = NULL; in SETDEFAULTS_FUNC()
2785 if (NULL != cpv->v.v) { in SETDEFAULTS_FUNC()
2791 ERR_error_string(ERR_get_error(), NULL), in SETDEFAULTS_FUNC()
2804 if (NULL != cpv->v.v) { in SETDEFAULTS_FUNC()
2809 ERR_error_string(ERR_get_error(), NULL), in SETDEFAULTS_FUNC()
2838 cpv->v.b = NULL; in SETDEFAULTS_FUNC()
2844 cpv->v.b = NULL; in SETDEFAULTS_FUNC()
2874 if (NULL == ca_store && ssl_ca_crl_file && i != 0) { in SETDEFAULTS_FUNC()
2891 if (NULL == ssl_ca_crl_file) in SETDEFAULTS_FUNC()
2916 if (NULL == privkey) privkey = pemfile; in SETDEFAULTS_FUNC()
2972 "SSL: %d %d %s",ssl_r,wr,ERR_error_string(err,NULL)); in mod_openssl_write_err()
3002 "SSL: %d %d %s", ssl_r, wr, ERR_error_string(err, NULL)); in mod_openssl_write_err()
3127 char *mem = NULL; in connection_read_cq_ssl()
3218 "SSL: %d %s", rc, ERR_error_string(ssl_err, NULL)); in connection_read_cq_ssl()
3276 "SSL: %d %s (%s)", rc, ERR_error_string(ssl_err, NULL), in connection_read_cq_ssl()
3310 if (NULL != hctx->ssl in CONNECTION_FUNC()
3322 "SSL: %s", ERR_error_string(ERR_get_error(), NULL)); in CONNECTION_FUNC()
3345 if (NULL == hctx) return HANDLER_GO_ON; in CONNECTION_FUNC()
3449 "SSL: %d %d %s", ssl_r, ret, ERR_error_string(err, NULL)); in mod_openssl_close_notify()
3465 if (NULL != hctx) { in CONNECTION_FUNC()
3466 con->plugin_ctx[p->id] = NULL; in CONNECTION_FUNC()
3547 BIGNUM *serialBN = ASN1_INTEGER_to_BN(xsn, NULL); in https_add_ssl_client_entries()
3576 if (NULL != (bio = BIO_new(BIO_s_mem()))) { in https_add_ssl_client_entries()
3620 if (NULL == hctx) return HANDLER_GO_ON; in REQUEST_FUNC()
3643 if (NULL == hctx) return HANDLER_GO_ON; in REQUEST_FUNC()
3657 r->plugin_ctx[p->id] = NULL; /* simple flag for request_env_patched */ in REQUEST_FUNC()
3709 if (NULL == b) /* default: min TLSv1.2, max TLSv1.3 */ in mod_openssl_ssl_conf_proto_val()
3759 buffer *cipherstring = NULL; in mod_openssl_ssl_conf_cmd()
3760 buffer *ciphersuites = NULL; in mod_openssl_ssl_conf_cmd()
3761 buffer *minb = NULL; in mod_openssl_ssl_conf_cmd()
3762 buffer *maxb = NULL; in mod_openssl_ssl_conf_cmd()
3763 buffer *curves = NULL; in mod_openssl_ssl_conf_cmd()
3892 "SSL: %s", ERR_error_string(ERR_get_error(), NULL)); in mod_openssl_ssl_conf_cmd()
3904 "SSL: %s", ERR_error_string(ERR_get_error(), NULL)); in mod_openssl_ssl_conf_cmd()