Lines Matching refs:NULL

110 …stream) && (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", _name)) != NULL)
262 php_error_docref(NULL, E_WARNING, "SSL: fatal protocol error"); in php_openssl_handle_ssl_error()
268 char *estr = php_socket_strerror(php_socket_errno(), NULL, 0); in php_openssl_handle_ssl_error()
270 php_error_docref(NULL, E_WARNING, in php_openssl_handle_ssl_error()
286 php_error_docref(NULL, E_WARNING, in php_openssl_handle_ssl_error()
305 php_error_docref(NULL, E_WARNING, in php_openssl_handle_ssl_error()
377 const char *method = NULL; in php_openssl_x509_fingerprint_match()
395 …php_error_docref(NULL, E_WARNING, "Invalid peer_fingerprint array; [algo => fingerprint] form requ… in php_openssl_x509_fingerprint_match()
400 if (key == NULL || Z_TYPE_P(current) != IS_STRING) { in php_openssl_x509_fingerprint_match()
401 …php_error_docref(NULL, E_WARNING, "Invalid peer_fingerprint array; [algo => fingerprint] form requ… in php_openssl_x509_fingerprint_match()
411 php_error_docref(NULL, E_WARNING, in php_openssl_x509_fingerprint_match()
420 char *wildcard = NULL; in php_openssl_matches_wildcard_name()
446 memchr(subjectname + prefix_len, '.', subject_len - suffix_len - prefix_len) == NULL; in php_openssl_matches_wildcard_name()
456 unsigned char *cert_name = NULL; in php_openssl_matches_san_list()
544 php_error_docref(NULL, E_WARNING, "Unable to locate peer certificate CN"); in php_openssl_matches_common_name()
546 php_error_docref(NULL, E_WARNING, "Peer certificate CN=`%.*s' is malformed", cert_name_len, buf); in php_openssl_matches_common_name()
550 php_error_docref(NULL, E_WARNING, in php_openssl_matches_common_name()
561 zval *val = NULL; in php_openssl_apply_peer_verification_policy()
563 char *peer_name = NULL; in php_openssl_apply_peer_verification_policy()
582 if ((must_verify_peer || must_verify_peer_name || must_verify_fingerprint) && peer == NULL) { in php_openssl_apply_peer_verification_policy()
583 php_error_docref(NULL, E_WARNING, "Could not get peer certificate"); in php_openssl_apply_peer_verification_policy()
602 php_error_docref(NULL, E_WARNING, in php_openssl_apply_peer_verification_policy()
615 php_error_docref(NULL, E_WARNING, in php_openssl_apply_peer_verification_policy()
621 php_error_docref(NULL, E_WARNING, in php_openssl_apply_peer_verification_policy()
633 if (peer_name == NULL && sslsock->is_client) { in php_openssl_apply_peer_verification_policy()
657 zval *val = NULL; in php_openssl_passwd_callback()
658 char *passphrase = NULL; in php_openssl_passwd_callback()
677 PCCERT_CONTEXT cert_ctx = NULL; in php_openssl_win_cert_verify_callback()
678 PCCERT_CHAIN_CONTEXT cert_chain_ctx = NULL; in php_openssl_win_cert_verify_callback()
695 unsigned char *der_buf = NULL; in php_openssl_win_cert_verify_callback()
707 …php_error_docref(NULL, E_WARNING, "Error encoding X509 certificate: %d: %s", err_code, ERR_error_s… in php_openssl_win_cert_verify_callback()
714 if (cert_ctx == NULL) { in php_openssl_win_cert_verify_callback()
716 php_error_docref(NULL, E_WARNING, "Error creating certificate context: %s", err); in php_openssl_win_cert_verify_callback()
738 …if (!CertGetCertificateChain(NULL, cert_ctx, NULL, NULL, &chain_params, chain_flags, NULL, &cert_c… in php_openssl_win_cert_verify_callback()
740 php_error_docref(NULL, E_WARNING, "Error getting certificate chain: %s", err); in php_openssl_win_cert_verify_callback()
773 ssl_policy_params.pwszServerName = NULL; in php_openssl_win_cert_verify_callback()
783 php_error_docref(NULL, E_WARNING, "Error verifying certificate chain policy: %s", err); in php_openssl_win_cert_verify_callback()
811 char *line = NULL; in php_openssl_load_stream_cafile()
815 stream = php_stream_open_wrapper(cafile, "rb", 0, NULL); in php_openssl_load_stream_cafile()
817 if (stream == NULL) { in php_openssl_load_stream_cafile()
827 line = php_stream_get_line(stream, NULL, 0, &line_len); in php_openssl_load_stream_cafile()
828 if (line == NULL) { in php_openssl_load_stream_cafile()
845 line = php_stream_get_line(stream, NULL, 0, &line_len); in php_openssl_load_stream_cafile()
846 if (line == NULL) { in php_openssl_load_stream_cafile()
861 cert = PEM_read_bio_X509(buffer, NULL, 0, NULL); in php_openssl_load_stream_cafile()
888 zval *val = NULL; in php_openssl_enable_peer_verification()
889 char *cafile = NULL; in php_openssl_enable_peer_verification()
890 char *capath = NULL; in php_openssl_enable_peer_verification()
896 if (cafile == NULL) { in php_openssl_enable_peer_verification()
898 cafile = strlen(cafile) ? cafile : NULL; in php_openssl_enable_peer_verification()
902 if (cert_names != NULL) { in php_openssl_enable_peer_verification()
910 if (capath == NULL) { in php_openssl_enable_peer_verification()
912 capath = strlen(capath) ? capath : NULL; in php_openssl_enable_peer_verification()
927 php_error_docref(NULL, E_WARNING, in php_openssl_enable_peer_verification()
942 SSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, NULL); in php_openssl_disable_peer_verification()
948 zval *val = NULL; in php_openssl_set_local_cert()
949 char *certfile = NULL; in php_openssl_set_local_cert()
956 const char *private_key = NULL; in php_openssl_set_local_cert()
962 php_error_docref(NULL, E_WARNING, "Unable to get real path of certificate file `%s'", certfile); in php_openssl_set_local_cert()
967 php_error_docref(NULL, E_WARNING, in php_openssl_set_local_cert()
978 …php_error_docref(NULL, E_WARNING, "Unable to get real path of private key file `%s'", private_key); in php_openssl_set_local_cert()
982 php_error_docref(NULL, E_WARNING, "Unable to set private key file `%s'", resolved_path_buff); in php_openssl_set_local_cert()
986 php_error_docref(NULL, E_WARNING, "Private key does not match certificate!"); in php_openssl_set_local_cert()
1128 gettimeofday(&now, NULL); in php_openssl_limit_handshake_reneg()
1153 "ssl", "reneg_limit_callback")) != NULL in php_openssl_limit_handshake_reneg()
1161 if (FAILURE == call_user_function(NULL, NULL, val, &retval, 1, &param)) { in php_openssl_limit_handshake_reneg()
1173 php_error_docref(NULL, E_WARNING, in php_openssl_limit_handshake_reneg()
1196 NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "reneg_limit")) in php_openssl_init_server_reneg_limit()
1207 NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "reneg_window")) in php_openssl_init_server_reneg_limit()
1229 BIGNUM *bn = NULL; in php_openssl_tmp_rsa_cb()
1230 static RSA *rsa_tmp = NULL; in php_openssl_tmp_rsa_cb()
1232 if (!rsa_tmp && ((bn = BN_new()) == NULL)) { in php_openssl_tmp_rsa_cb()
1233 php_error_docref(NULL, E_WARNING, "allocation error generating RSA key"); in php_openssl_tmp_rsa_cb()
1236 if (!BN_set_word(bn, RSA_F4) || ((rsa_tmp = RSA_new()) == NULL) || in php_openssl_tmp_rsa_cb()
1237 !RSA_generate_key_ex(rsa_tmp, keylength, bn, NULL)) { in php_openssl_tmp_rsa_cb()
1241 rsa_tmp = NULL; in php_openssl_tmp_rsa_cb()
1253 if (zdhpath == NULL) { in php_openssl_set_server_dh_param()
1269 if (bio == NULL) { in php_openssl_set_server_dh_param()
1270 php_error_docref(NULL, E_WARNING, "Invalid dh_param"); in php_openssl_set_server_dh_param()
1275 EVP_PKEY *pkey = PEM_read_bio_Parameters(bio, NULL); in php_openssl_set_server_dh_param()
1278 if (pkey == NULL) { in php_openssl_set_server_dh_param()
1279 php_error_docref(NULL, E_WARNING, "Failed reading DH params"); in php_openssl_set_server_dh_param()
1284 php_error_docref(NULL, E_WARNING, "Failed assigning DH params"); in php_openssl_set_server_dh_param()
1289 DH *dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); in php_openssl_set_server_dh_param()
1292 if (dh == NULL) { in php_openssl_set_server_dh_param()
1293 php_error_docref(NULL, E_WARNING, "Failed reading DH params"); in php_openssl_set_server_dh_param()
1298 php_error_docref(NULL, E_WARNING, "Failed assigning DH params"); in php_openssl_set_server_dh_param()
1318 if (zvcurve == NULL) { in php_openssl_set_server_ecdh_curve()
1328 php_error_docref(NULL, E_WARNING, "Invalid ecdh_curve specified"); in php_openssl_set_server_ecdh_curve()
1334 if (ecdh == NULL) { in php_openssl_set_server_ecdh_curve()
1335 php_error_docref(NULL, E_WARNING, "Failed generating ECDH curve"); in php_openssl_set_server_ecdh_curve()
1362 if (php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "ssl", "rsa_key_size") != NULL) { in php_openssl_set_server_specific_opts()
1363 php_error_docref(NULL, E_WARNING, "rsa_key_size context option has been removed"); in php_openssl_set_server_specific_opts()
1371 if (zv == NULL || zend_is_true(zv)) { in php_openssl_set_server_specific_opts()
1376 if (zv == NULL || zend_is_true(zv)) { in php_openssl_set_server_specific_opts()
1425 php_error_docref(NULL, E_WARNING, in php_openssl_create_sni_server_ctx()
1432 return NULL; in php_openssl_create_sni_server_ctx()
1434 php_error_docref(NULL, E_WARNING, in php_openssl_create_sni_server_ctx()
1439 return NULL; in php_openssl_create_sni_server_ctx()
1467 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1475 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1490 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1502 if (local_cert == NULL) { in php_openssl_enable_server_sni()
1503 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1516 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1526 if (local_pk == NULL) { in php_openssl_enable_server_sni()
1527 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1540 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1556 php_error_docref(NULL, E_WARNING, in php_openssl_enable_server_sni()
1563 if (ctx == NULL) { in php_openssl_enable_server_sni()
1617 return NULL; in php_openssl_alpn_protos_parse()
1626 return NULL; in php_openssl_alpn_protos_parse()
1666 char *cipherlist = NULL; in php_openssl_setup_crypto()
1667 char *alpn_protocols = NULL; in php_openssl_setup_crypto()
1672 php_error_docref(NULL, E_WARNING, "SSL/TLS already set-up for this stream"); in php_openssl_setup_crypto()
1689 if (sslsock->ctx == NULL) { in php_openssl_setup_crypto()
1690 php_error_docref(NULL, E_WARNING, "SSL context creation failure"); in php_openssl_setup_crypto()
1745 php_error_docref(NULL, E_WARNING, "Security level must be between 0 and 5"); in php_openssl_setup_crypto()
1759 if (alpn == NULL) { in php_openssl_setup_crypto()
1760 php_error_docref(NULL, E_WARNING, "Failed parsing comma-separated TLS ALPN protocol string"); in php_openssl_setup_crypto()
1762 sslsock->ctx = NULL; in php_openssl_setup_crypto()
1776 php_error_docref(NULL, E_WARNING, in php_openssl_setup_crypto()
1801 if (sslsock->ssl_handle == NULL) { in php_openssl_setup_crypto()
1802 php_error_docref(NULL, E_WARNING, "SSL handle creation failure"); in php_openssl_setup_crypto()
1804 sslsock->ctx = NULL; in php_openssl_setup_crypto()
1808 sslsock->alpn_ctx.data = NULL; in php_openssl_setup_crypto()
1838 php_error_docref(NULL, E_WARNING, "Supplied session stream must be an SSL enabled stream"); in php_openssl_setup_crypto()
1839 …} else if (((php_openssl_netstream_data_t*)cparam->inputs.session->abstract)->ssl_handle == NULL) { in php_openssl_setup_crypto()
1840 php_error_docref(NULL, E_WARNING, "Supplied SSL session stream is not initialized"); in php_openssl_setup_crypto()
1857 if (NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), in php_openssl_capture_peer_certs()
1870 if (NULL != (val = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), in php_openssl_capture_peer_certs()
1943 gettimeofday(&start_time, NULL); in php_openssl_enable_crypto()
1957 gettimeofday(&cur_time, NULL); in php_openssl_enable_crypto()
1961 php_error_docref(NULL, E_WARNING, "SSL: Handshake timed out"); in php_openssl_enable_crypto()
1979 (POLLIN|POLLPRI) : POLLOUT, has_timeout ? &left_time : NULL); in php_openssl_enable_crypto()
2055 struct timeval *timeout = NULL; in php_openssl_sockop_io()
2077 gettimeofday(&start_time, NULL); in php_openssl_sockop_io()
2086 gettimeofday(&cur_time, NULL); in php_openssl_sockop_io()
2155 (POLLOUT|POLLPRI) : (POLLIN|POLLPRI), has_timeout ? &left_time : NULL); in php_openssl_sockop_io()
2158 (POLLIN|POLLPRI) : (POLLOUT|POLLPRI), has_timeout ? &left_time : NULL); in php_openssl_sockop_io()
2174 (POLLOUT|POLLPRI) : (POLLIN|POLLPRI), has_timeout ? &left_time : NULL); in php_openssl_sockop_io()
2177 (POLLIN|POLLPRI) : (POLLOUT|POLLPRI), has_timeout ? &left_time : NULL); in php_openssl_sockop_io()
2253 sslsock->ssl_handle = NULL; in php_openssl_sockop_close()
2257 sslsock->ctx = NULL; in php_openssl_sockop_close()
2296 sslsock->sni_certs = NULL; in php_openssl_sockop_close()
2330 zval *tmpzval = NULL; in php_openssl_tcp_sockop_accept()
2332 xparam->outputs.client = NULL; in php_openssl_tcp_sockop_accept()
2335 …al = php_stream_context_get_option(PHP_STREAM_CONTEXT(stream), "socket", "tcp_nodelay")) != NULL && in php_openssl_tcp_sockop_accept()
2341 xparam->want_textaddr ? &xparam->outputs.textaddr : NULL, in php_openssl_tcp_sockop_accept()
2342 xparam->want_addr ? &xparam->outputs.addr : NULL, in php_openssl_tcp_sockop_accept()
2343 xparam->want_addr ? &xparam->outputs.addrlen : NULL, in php_openssl_tcp_sockop_accept()
2345 xparam->want_errortext ? &xparam->outputs.error_text : NULL, in php_openssl_tcp_sockop_accept()
2362 xparam->outputs.client = php_stream_alloc_rel(stream->ops, clisockdata, NULL, "r+"); in php_openssl_tcp_sockop_accept()
2377 NULL) < 0 || php_stream_xport_crypto_enable( in php_openssl_tcp_sockop_accept()
2379 php_error_docref(NULL, E_WARNING, "Failed to enable crypto"); in php_openssl_tcp_sockop_accept()
2382 xparam->outputs.client = NULL; in php_openssl_tcp_sockop_accept()
2388 return xparam->outputs.client == NULL ? -1 : 0; in php_openssl_tcp_sockop_accept()
2428 add_assoc_long(&tmp, "cipher_bits", SSL_CIPHER_get_bits(cipher, NULL)); in php_openssl_sockop_set_option()
2433 const unsigned char *alpn_proto = NULL; in php_openssl_sockop_set_option()
2489 struct timeval *timeout = NULL; in php_openssl_sockop_set_option()
2505 gettimeofday(&start_time, NULL); in php_openssl_sockop_set_option()
2514 gettimeofday(&cur_time, NULL); in php_openssl_sockop_set_option()
2561 …d_for(sslsock->s.socket, PHP_POLLREADABLE|POLLPRI|POLLOUT, has_timeout ? &left_time : NULL) <= 0) { in php_openssl_sockop_set_option()
2630 if (php_stream_xport_crypto_setup(stream, sslsock->method, NULL) < 0 || in php_openssl_sockop_set_option()
2632 php_error_docref(NULL, E_WARNING, "Failed to enable crypto"); in php_openssl_sockop_set_option()
2708 NULL, /* seek */
2719 if (ctx && (val = php_stream_context_get_option(ctx, "ssl", "crypto_method")) != NULL) { in php_openssl_get_crypto_method()
2734 return NULL; in php_openssl_get_url_name()
2739 return NULL; in php_openssl_get_url_name()
2744 char * url_name = NULL; in php_openssl_get_url_name()
2761 return NULL; in php_openssl_get_url_name()
2771 php_stream *stream = NULL; in php_openssl_ssl_socket_factory()
2772 php_openssl_netstream_data_t *sslsock = NULL; in php_openssl_ssl_socket_factory()
2795 sslsock->ctx = NULL; in php_openssl_ssl_socket_factory()
2799 if (stream == NULL) { in php_openssl_ssl_socket_factory()
2801 return NULL; in php_openssl_ssl_socket_factory()
2808 php_error_docref(NULL, E_WARNING, "SSLv2 unavailable in this PHP version"); in php_openssl_ssl_socket_factory()
2810 return NULL; in php_openssl_ssl_socket_factory()
2816 php_error_docref(NULL, E_WARNING, in php_openssl_ssl_socket_factory()
2819 return NULL; in php_openssl_ssl_socket_factory()
2832 php_error_docref(NULL, E_WARNING, in php_openssl_ssl_socket_factory()
2835 return NULL; in php_openssl_ssl_socket_factory()
2842 php_error_docref(NULL, E_WARNING, in php_openssl_ssl_socket_factory()
2845 return NULL; in php_openssl_ssl_socket_factory()
2852 php_error_docref(NULL, E_WARNING, in php_openssl_ssl_socket_factory()
2855 return NULL; in php_openssl_ssl_socket_factory()