Lines Matching defs:int

28 static int ssl_undefined_function_1(SSL *ssl, SSL3_RECORD *r, size_t s, int t,
34 static int ssl_undefined_function_2(SSL *ssl, SSL3_RECORD *r, unsigned char *s,
35 int t)
40 static int ssl_undefined_function_3(SSL *ssl, unsigned char *r,
46 static int ssl_undefined_function_4(SSL *ssl, int r)
57 static int ssl_undefined_function_6(int r)
62 static int ssl_undefined_function_7(SSL *ssl, unsigned char *r, size_t s,
64 const unsigned char *v, size_t w, int x)
90 int (*func_read) (SSL *, void *, size_t, size_t *);
91 int (*func_write) (SSL *, const void *, size_t, size_t *);
92 int (*func_other) (SSL *);
99 int nid;
112 static int dane_ctx_enable(struct dane_ctx_st *dctx)
117 int n = ((int)mdmax) + 1; /* int to handle PrivMatch(255) */
188 static int ssl_dane_dup(SSL *to, SSL *from)
190 int num;
191 int i;
217 static int dane_mtype_set(struct dane_ctx_st *dctx,
220 int i;
230 int n = ((int)mtype) + 1;
269 static int dane_tlsa_add(SSL_DANE *dane,
276 int ilen = (int)dlen;
277 int i;
278 int num;
457 static int ssl_check_allowed_versions(int min_version, int max_version)
459 int minisdtls = 0, maxisdtls = 0;
585 int SSL_clear(SSL *s)
592 int SSL_clear_quic(SSL *s)
630 int SSL_clear_not_quic(SSL *s)
632 int SSL_clear(SSL *s)
713 int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth)
925 int SSL_is_dtls(const SSL *s)
930 int SSL_up_ref(SSL *s)
932 int i;
942 int SSL_CTX_set_session_id_context(SSL_CTX *ctx, const unsigned char *sid_ctx,
943 unsigned int sid_ctx_len)
955 int SSL_set_session_id_context(SSL *ssl, const unsigned char *sid_ctx,
956 unsigned int sid_ctx_len)
968 int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb)
977 int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB cb)
986 int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
987 unsigned int id_len)
1012 int SSL_CTX_set_purpose(SSL_CTX *s, int purpose)
1017 int SSL_set_purpose(SSL *s, int purpose)
1022 int SSL_CTX_set_trust(SSL_CTX *s, int trust)
1027 int SSL_set_trust(SSL *s, int trust)
1032 int SSL_set1_host(SSL *s, const char *hostname)
1042 int SSL_add1_host(SSL *s, const char *hostname)
1071 void SSL_set_hostflags(SSL *s, unsigned int flags)
1081 int SSL_CTX_dane_enable(SSL_CTX *ctx)
1102 int SSL_dane_enable(SSL *s, const char *basedomain)
1161 int SSL_get0_dane_authority(SSL *s, X509 **mcert, EVP_PKEY **mspki)
1176 int SSL_get0_dane_tlsa(SSL *s, uint8_t *usage, uint8_t *selector,
1203 int SSL_dane_tlsa_add(SSL *s, uint8_t usage, uint8_t selector,
1209 int SSL_CTX_dane_mtype_set(SSL_CTX *ctx, const EVP_MD *md, uint8_t mtype,
1215 int SSL_CTX_set1_param(SSL_CTX *ctx, X509_VERIFY_PARAM *vpm)
1220 int SSL_set1_param(SSL *ssl, X509_VERIFY_PARAM *vpm)
1242 int i;
1433 int SSL_get_fd(const SSL *s)
1438 int SSL_get_rfd(const SSL *s)
1440 int ret = -1;
1450 int SSL_get_wfd(const SSL *s)
1452 int ret = -1;
1463 int SSL_set_fd(SSL *s, int fd)
1465 int ret = 0;
1490 int SSL_set_wfd(SSL *s, int fd)
1495 || (int)BIO_get_fd(rbio, NULL) != fd) {
1520 int SSL_set_rfd(SSL *s, int fd)
1525 || ((int)BIO_get_fd(wbio, NULL) != fd)) {
1567 int SSL_get_verify_mode(const SSL *s)
1572 int SSL_get_verify_depth(const SSL *s)
1577 int (*SSL_get_verify_callback(const SSL *s)) (int, X509_STORE_CTX *) {
1581 int SSL_CTX_get_verify_mode(const SSL_CTX *ctx)
1586 int SSL_CTX_get_verify_depth(const SSL_CTX *ctx)
1591 int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx)) (int, X509_STORE_CTX *) {
1595 void SSL_set_verify(SSL *s, int mode,
1596 int (*callback) (int ok, X509_STORE_CTX *ctx))
1603 void SSL_set_verify_depth(SSL *s, int depth)
1608 void SSL_set_read_ahead(SSL *s, int yes)
1613 int SSL_get_read_ahead(const SSL *s)
1618 int SSL_pending(const SSL *s)
1632 return pending < INT_MAX ? (int)pending : INT_MAX;
1635 int SSL_has_pending(const SSL *s)
1704 int SSL_copy_session_id(SSL *t, const SSL *f)
1706 int i;
1725 if (!SSL_set_session_id_context(t, f->sid_ctx, (int)f->sid_ctx_length)) {
1733 int SSL_CTX_check_private_key(const SSL_CTX *ctx)
1748 int SSL_check_private_key(const SSL *ssl)
1766 int SSL_waiting_for_async(SSL *s)
1774 int SSL_get_all_async_fds(SSL *s, OSSL_ASYNC_FD *fds, size_t *numfds)
1783 int SSL_get_changed_async_fds(SSL *s, OSSL_ASYNC_FD *addfd, size_t *numaddfds,
1794 int SSL_CTX_set_async_callback(SSL_CTX *ctx, SSL_async_callback_fn callback)
1800 int SSL_CTX_set_async_callback_arg(SSL_CTX *ctx, void *arg)
1806 int SSL_set_async_callback(SSL *s, SSL_async_callback_fn callback)
1812 int SSL_set_async_callback_arg(SSL *s, void *arg)
1818 int SSL_get_async_status(SSL *s, int *status)
1828 int SSL_accept(SSL *s)
1838 int SSL_connect(SSL *s)
1853 static int ssl_async_wait_ctx_cb(void *arg)
1860 static int ssl_start_async_job(SSL *s, struct ssl_async_args *args,
1861 int (*func) (void *))
1863 int ret;
1898 static int ssl_io_intern(void *vargs)
1920 int ssl_read_internal(SSL *s, void *buf, size_t num, size_t *readbytes)
1951 int ret;
1967 int SSL_read(SSL *s, void *buf, int num)
1969 int ret;
1984 ret = (int)readbytes;
1989 int SSL_read_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
1991 int ret = ssl_read_internal(s, buf, num, readbytes);
1998 int SSL_read_early_data(SSL *s, void *buf, size_t num, size_t *readbytes)
2000 int ret;
2052 int SSL_get_early_data_status(const SSL *s)
2057 static int ssl_peek_internal(SSL *s, void *buf, size_t num, size_t *readbytes)
2075 int ret;
2091 int SSL_peek(SSL *s, void *buf, int num)
2093 int ret;
2108 ret = (int)readbytes;
2114 int SSL_peek_ex(SSL *s, void *buf, size_t num, size_t *readbytes)
2116 int ret = ssl_peek_internal(s, buf, num, readbytes);
2123 int ssl_write_internal(SSL *s, const void *buf, size_t num, size_t *written)
2152 int ret;
2169 ossl_ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size, int flags)
2233 int SSL_write(SSL *s, const void *buf, int num)
2235 int ret;
2250 ret = (int)written;
2255 int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written)
2257 int ret = ssl_write_internal(s, buf, num, written);
2264 int SSL_write_early_data(SSL *s, const void *buf, size_t num, size_t *written)
2266 int ret, early_data_state;
2335 int SSL_shutdown(SSL *s)
2368 int SSL_key_update(SSL *s, int updatetype)
2396 int SSL_get_key_update_type(const SSL *s)
2405 static int can_renegotiate(const SSL *s)
2420 int SSL_renegotiate(SSL *s)
2430 int SSL_renegotiate_abbreviated(SSL *s)
2440 int SSL_renegotiate_pending(const SSL *s)
2449 int SSL_new_session_ticket(SSL *s)
2462 long SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
2528 return (int)s->s3.tmp.ciphers_rawlen;
2541 && ssl_set_version_bound(s->ctx->method->version, (int)larg,
2547 && ssl_set_version_bound(s->ctx->method->version, (int)larg,
2556 long SSL_callback_ctrl(SSL *s, int cmd, void (*fp) (void))
2561 (int write_p, int version, int content_type,
2576 static int ssl_tsan_load(SSL_CTX *ctx, TSAN_QUALIFIER int *stat)
2578 int res = 0;
2587 long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
2690 && ssl_set_version_bound(ctx->method->version, (int)larg,
2696 && ssl_set_version_bound(ctx->method->version, (int)larg,
2705 long SSL_CTX_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void))
2710 (int write_p, int version, int content_type,
2720 int ssl_cipher_id_cmp(const SSL_CIPHER *a, const SSL_CIPHER *b)
2729 int ssl_cipher_ptr_id_cmp(const SSL_CIPHER *const *ap,
2763 int i;
2801 const char *SSL_get_cipher_list(const SSL *s, int n)
2830 static int cipher_list_tls12_num(STACK_OF(SSL_CIPHER) *sk)
2832 int i, num = 0;
2847 int SSL_CTX_set_cipher_list(SSL_CTX *ctx, const char *str)
2871 int SSL_set_cipher_list(SSL *s, const char *str)
2888 char *SSL_get_shared_ciphers(const SSL *s, char *buf, int size)
2893 int i;
2910 int n;
2942 const char *SSL_get_servername(const SSL *s, const int type)
2948 int server = s->handshake_func == NULL ? 0 : s->server;
3008 int SSL_get_servername_type(const SSL *s)
3035 int SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
3037 unsigned int server_len,
3038 const unsigned char *client, unsigned int client_len)
3106 *len = (unsigned int)s->ext.npn_len;
3147 static int alpn_value_ok(const unsigned char *protos, unsigned int protos_len)
3149 unsigned int idx;
3165 int SSL_CTX_set_alpn_protos(SSL_CTX *ctx, const unsigned char *protos,
3166 unsigned int protos_len)
3197 int SSL_set_alpn_protos(SSL *ssl, const unsigned char *protos,
3198 unsigned int protos_len)
3244 unsigned int *len)
3250 *len = (unsigned int)ssl->s3.alpn_selected_len;
3253 int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
3256 int use_context)
3267 int SSL_export_keying_material_early(SSL *s, unsigned char *out, size_t olen,
3306 static int ssl_session_cmp(const SSL_SESSION *a, const SSL_SESSION *b)
3538 int SSL_CTX_up_ref(SSL_CTX *ctx)
3540 int i;
3552 int i;
3676 int (*cb) (X509_STORE_CTX *, void *),
3683 void SSL_CTX_set_verify(SSL_CTX *ctx, int mode,
3684 int (*cb) (int, X509_STORE_CTX *))
3690 void SSL_CTX_set_verify_depth(SSL_CTX *ctx, int depth)
3695 void SSL_CTX_set_cert_cb(SSL_CTX *c, int (*cb) (SSL *ssl, void *arg), void *arg)
3700 void SSL_set_cert_cb(SSL *s, int (*cb) (SSL *ssl, void *arg), void *arg)
3709 int rsa_enc, rsa_sign, dh_tmp, dsa_sign;
3711 int have_ecc_cert, ecdsa_ok;
3809 int ssl_check_srvr_ecc_cert_and_alg(X509 *x, SSL *s)
3821 int ssl_get_server_cert_serverinfo(SSL *s, const unsigned char **serverinfo,
3835 void ssl_update_cache(SSL *s, int mode)
3837 int i;
3896 TSAN_QUALIFIER int *stat;
3917 int SSL_set_ssl_method(SSL *s, const SSL_METHOD *meth)
3919 int ret = 1;
3923 int (*hf) (SSL *) = s->handshake_func;
3941 int SSL_get_error(const SSL *s, int i)
3943 int reason;
4030 static int ssl_do_handshake_intern(void *vargs)
4041 int SSL_do_handshake(SSL *s)
4043 int ret = 1;
4102 int ssl_undefined_function(SSL *s)
4108 int ssl_undefined_void_function(void)
4114 int ssl_undefined_const_function(const SSL *s)
4119 const SSL_METHOD *ssl_bad_method(int ver)
4125 const char *ssl_protocol_to_string(int version)
4163 static int dup_ca_names(STACK_OF(X509_NAME) **dst, STACK_OF(X509_NAME) *src)
4167 int i;
4196 int i;
4235 (int)s->sid_ctx_length))
4377 int ssl_init_wbio_buffer(SSL *s)
4398 int ssl_free_wbio_buffer(SSL *s)
4411 void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode)
4416 int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx)
4421 void SSL_set_quiet_shutdown(SSL *s, int mode)
4426 int SSL_get_quiet_shutdown(const SSL *s)
4431 void SSL_set_shutdown(SSL *s, int mode)
4436 int SSL_get_shutdown(const SSL *s)
4441 int SSL_version(const SSL *s)
4446 int SSL_client_version(const SSL *s)
4503 int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
4509 int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx)
4527 int SSL_CTX_set_default_verify_file(SSL_CTX *ctx)
4546 int SSL_CTX_set_default_verify_store(SSL_CTX *ctx)
4564 int SSL_CTX_load_verify_file(SSL_CTX *ctx, const char *CAfile)
4570 int SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath)
4575 int SSL_CTX_load_verify_store(SSL_CTX *ctx, const char *CAstore)
4581 int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
4594 void (*cb) (const SSL *ssl, int type, int val))
4604 int /* type */ ,
4605 int /* val */ ) {
4650 int SSL_SESSION_set1_master_key(SSL_SESSION *sess, const unsigned char *in,
4662 int SSL_set_ex_data(SSL *s, int idx, void *arg)
4667 void *SSL_get_ex_data(const SSL *s, int idx)
4672 int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg)
4677 void *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx)
4700 int SSL_want(const SSL *s)
4706 int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *identity_hint)
4722 int SSL_use_psk_identity_hint(SSL *s, const char *identity_hint)
4799 void (*cb) (int write_p, int version,
4800 int content_type, const void *buf,
4807 void (*cb) (int write_p, int version,
4808 int content_type, const void *buf,
4815 int (*cb) (SSL *ssl,
4816 int
4824 int (*cb) (SSL *ssl,
4825 int is_forward_secure))
4832 size_t (*cb) (SSL *ssl, int type,
4848 int SSL_CTX_set_block_padding(SSL_CTX *ctx, size_t block_size)
4860 int SSL_set_record_padding_callback(SSL *ssl,
4861 size_t (*cb) (SSL *ssl, int type,
4884 int SSL_set_block_padding(SSL *ssl, size_t block_size)
4896 int SSL_set_num_tickets(SSL *s, size_t num_tickets)
4908 int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets)
4947 int ssl_handshake_hash(SSL *s, unsigned char *out, size_t outlen,
4952 int hashleni = EVP_MD_CTX_get_size(hdgst);
4953 int ret = 0;
4980 int SSL_session_reused(const SSL *s)
4985 int SSL_is_server(const SSL *s)
4991 void SSL_set_debug(SSL *s, int debug)
4999 void SSL_set_security_level(SSL *s, int level)
5004 int SSL_get_security_level(const SSL *s)
5010 int (*cb) (const SSL *s, const SSL_CTX *ctx,
5011 int op, int bits, int nid,
5017 int (*SSL_get_security_callback(const SSL *s)) (const SSL *s,
5018 const SSL_CTX *ctx, int op,
5019 int bits, int nid, void *other,
5034 void SSL_CTX_set_security_level(SSL_CTX *ctx, int level)
5039 int SSL_CTX_get_security_level(const SSL_CTX *ctx)
5045 int (*cb) (const SSL *s, const SSL_CTX *ctx,
5046 int op, int bits, int nid,
5052 int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx)) (const SSL *s,
5054 int op, int bits,
5055 int nid,
5119 static int ct_move_scts(STACK_OF(SCT) **dst, STACK_OF(SCT) *src,
5122 int scts_moved = 0;
5152 static int ct_extract_tls_extension_scts(SSL *s)
5154 int scts_extracted = 0;
5176 static int ct_extract_ocsp_response_scts(SSL *s)
5179 int scts_extracted = 0;
5184 int i;
5190 rsp = d2i_OCSP_RESPONSE(NULL, &p, (int)s->ext.ocsp.resp_len);
5227 static int ct_extract_x509v3_extension_scts(SSL *s)
5229 int scts_extracted = 0;
5265 static int ct_permissive(const CT_POLICY_EVAL_CTX * ctx,
5271 static int ct_strict(const CT_POLICY_EVAL_CTX * ctx,
5274 int count = scts != NULL ? sk_SCT_num(scts) : 0;
5275 int i;
5279 int status = SCT_get_validation_status(sct);
5288 int SSL_set_ct_validation_callback(SSL *s, ssl_ct_validation_cb callback,
5316 int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx,
5335 int SSL_ct_is_enabled(const SSL *s)
5340 int SSL_CTX_ct_is_enabled(const SSL_CTX *ctx)
5345 int ssl_validate_ct(SSL *s)
5347 int ret = 0;
5444 int SSL_CTX_enable_ct(SSL_CTX *ctx, int validation_mode)
5457 int SSL_enable_ct(SSL *s, int validation_mode)
5470 int SSL_CTX_set_default_ctlog_list_file(SSL_CTX *ctx)
5475 int SSL_CTX_set_ctlog_list_file(SSL_CTX *ctx, const char *path)
5500 int SSL_client_hello_isv2(SSL *s)
5507 unsigned int SSL_client_hello_get0_legacy_version(SSL *s)
5550 int SSL_client_hello_get1_extensions_present(SSL *s, int **out, size_t *outlen)
5553 int *present;
5588 int SSL_client_hello_get0_ext(SSL *s, unsigned int type, const unsigned char **out,
5609 int SSL_free_buffers(SSL *ssl)
5620 int SSL_alloc_buffers(SSL *ssl)
5635 static int nss_keylog_int(const char *prefix,
5688 int ssl_log_rsa_client_key_exchange(SSL *ssl,
5708 int ssl_log_secret(SSL *ssl,
5723 int ssl_cache_cipherlist(SSL *s, PACKET *cipher_suites, int sslv2format)
5725 int n;
5746 unsigned int leadbyte;
5788 int SSL_bytes_to_cipher_list(SSL *s, const unsigned char *bytes, size_t len,
5789 int isv2format, STACK_OF(SSL_CIPHER) **sk,
5799 int bytes_to_cipher_list(SSL *s, PACKET *cipher_suites,
5802 int sslv2format, int fatal)
5807 int n;
5885 int SSL_CTX_set_max_early_data(SSL_CTX *ctx, uint32_t max_early_data)
5897 int SSL_set_max_early_data(SSL *s, uint32_t max_early_data)
5909 int SSL_CTX_set_recv_max_early_data(SSL_CTX *ctx, uint32_t recv_max_early_data)
5921 int SSL_set_recv_max_early_data(SSL *s, uint32_t recv_max_early_data)
5933 __owur unsigned int ssl_get_max_send_fragment(const SSL *ssl)
5943 __owur unsigned int ssl_get_split_send_fragment(const SSL *ssl)
5958 int SSL_stateless(SSL *s)
5960 int ret;
5981 void SSL_CTX_set_post_handshake_auth(SSL_CTX *ctx, int val)
5986 void SSL_set_post_handshake_auth(SSL *ssl, int val)
5991 int SSL_verify_client_post_handshake(SSL *ssl)
6038 int SSL_CTX_set_session_ticket_cb(SSL_CTX *ctx,
6066 int nid,
6086 int ssl_evp_cipher_up_ref(const EVP_CIPHER *cipher)
6114 int nid,
6130 int ssl_evp_md_up_ref(const EVP_MD *md)
6157 int SSL_set0_tmp_dh_pkey(SSL *s, EVP_PKEY *dhpkey)
6169 int SSL_CTX_set0_tmp_dh_pkey(SSL_CTX *ctx, EVP_PKEY *dhpkey)