/mbedtls-3.5.0/library/ |
D | pkparse.c | 115 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_pk_parse_keyfile() local 119 if ((ret = mbedtls_pk_load_file(path, &buf, &n)) != 0) { in mbedtls_pk_parse_keyfile() 120 return ret; in mbedtls_pk_parse_keyfile() 124 ret = mbedtls_pk_parse_key(ctx, buf, n, NULL, 0, f_rng, p_rng); in mbedtls_pk_parse_keyfile() 126 ret = mbedtls_pk_parse_key(ctx, buf, n, in mbedtls_pk_parse_keyfile() 133 return ret; in mbedtls_pk_parse_keyfile() 141 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_pk_parse_public_keyfile() local 145 if ((ret = mbedtls_pk_load_file(path, &buf, &n)) != 0) { in mbedtls_pk_parse_public_keyfile() 146 return ret; in mbedtls_pk_parse_public_keyfile() 149 ret = mbedtls_pk_parse_public_key(ctx, buf, n); in mbedtls_pk_parse_public_keyfile() [all …]
|
D | pkcs7.c | 55 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pkcs7_get_next_content_len() local 57 ret = mbedtls_asn1_get_tag(p, end, len, MBEDTLS_ASN1_CONSTRUCTED in pkcs7_get_next_content_len() 59 if (ret != 0) { in pkcs7_get_next_content_len() 60 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_CONTENT_INFO, ret); in pkcs7_get_next_content_len() 62 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_CONTENT_INFO, in pkcs7_get_next_content_len() 66 return ret; in pkcs7_get_next_content_len() 75 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pkcs7_get_version() local 77 ret = mbedtls_asn1_get_int(p, end, ver); in pkcs7_get_version() 78 if (ret != 0) { in pkcs7_get_version() 79 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_VERSION, ret); in pkcs7_get_version() [all …]
|
D | x509_csr.c | 58 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_csr_get_version() local 60 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_csr_get_version() 61 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_csr_get_version() 66 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_csr_get_version() 78 int ret; in x509_csr_parse_extensions() local 86 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_csr_parse_extensions() 88 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_csr_parse_extensions() 94 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &extn_oid.len, in x509_csr_parse_extensions() 96 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_csr_parse_extensions() 104 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &len, in x509_csr_parse_extensions() [all …]
|
D | ssl_tls13_keys.c | 232 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_make_traffic_key() local 234 ret = mbedtls_ssl_tls13_hkdf_expand_label( in ssl_tls13_make_traffic_key() 240 if (ret != 0) { in ssl_tls13_make_traffic_key() 241 return ret; in ssl_tls13_make_traffic_key() 244 ret = mbedtls_ssl_tls13_hkdf_expand_label( in ssl_tls13_make_traffic_key() 250 return ret; in ssl_tls13_make_traffic_key() 276 int ret = 0; in mbedtls_ssl_tls13_make_traffic_keys() local 278 ret = ssl_tls13_make_traffic_key( in mbedtls_ssl_tls13_make_traffic_keys() 282 if (ret != 0) { in mbedtls_ssl_tls13_make_traffic_keys() 283 return ret; in mbedtls_ssl_tls13_make_traffic_keys() [all …]
|
D | ssl_tls13_server.c | 116 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_offered_psks_check_identity_match_ticket() local 145 if ((ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, in ssl_tls13_offered_psks_check_identity_match_ticket() 148 if (ret == MBEDTLS_ERR_SSL_INVALID_MAC) { in ssl_tls13_offered_psks_check_identity_match_ticket() 150 } else if (ret == MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED) { in ssl_tls13_offered_psks_check_identity_match_ticket() 153 MBEDTLS_SSL_DEBUG_RET(1, "ticket_parse", ret); in ssl_tls13_offered_psks_check_identity_match_ticket() 160 if (ret != 0) { in ssl_tls13_offered_psks_check_identity_match_ticket() 172 ret = MBEDTLS_ERR_ERROR_GENERIC_ERROR; in ssl_tls13_offered_psks_check_identity_match_ticket() 184 ret = MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED; in ssl_tls13_offered_psks_check_identity_match_ticket() 238 ret = 0; in ssl_tls13_offered_psks_check_identity_match_ticket() 243 if (ret != 0) { in ssl_tls13_offered_psks_check_identity_match_ticket() [all …]
|
D | entropy.c | 109 int idx, ret = 0; in mbedtls_entropy_add_source() local 112 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_entropy_add_source() 113 return ret; in mbedtls_entropy_add_source() 119 ret = MBEDTLS_ERR_ENTROPY_MAX_SOURCES; in mbedtls_entropy_add_source() 137 return ret; in mbedtls_entropy_add_source() 150 int ret = 0; in entropy_update() local 154 if ((ret = mbedtls_sha512(data, len, tmp, 0)) != 0) { in entropy_update() 158 if ((ret = mbedtls_sha256(data, len, tmp, 0)) != 0) { in entropy_update() 176 (ret = mbedtls_sha512_starts(&ctx->accumulator, 0)) != 0) { in entropy_update() 181 if ((ret = mbedtls_sha512_update(&ctx->accumulator, header, 2)) != 0) { in entropy_update() [all …]
|
D | chachapoly.c | 108 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_chachapoly_setkey() local 110 ret = mbedtls_chacha20_setkey(&ctx->chacha20_ctx, key); in mbedtls_chachapoly_setkey() 112 return ret; in mbedtls_chachapoly_setkey() 119 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_chachapoly_starts() local 123 ret = mbedtls_chacha20_starts(&ctx->chacha20_ctx, nonce, 0U); in mbedtls_chachapoly_starts() 124 if (ret != 0) { in mbedtls_chachapoly_starts() 134 ret = mbedtls_chacha20_update(&ctx->chacha20_ctx, sizeof(poly1305_key), in mbedtls_chachapoly_starts() 136 if (ret != 0) { in mbedtls_chachapoly_starts() 140 ret = mbedtls_poly1305_starts(&ctx->poly1305_ctx, poly1305_key); in mbedtls_chachapoly_starts() 142 if (ret == 0) { in mbedtls_chachapoly_starts() [all …]
|
D | x509_crl.c | 66 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_crl_get_version() local 68 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_crl_get_version() 69 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_crl_get_version() 74 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_crl_get_version() 91 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_crl_ext() local 101 if ((ret = mbedtls_x509_get_ext(p, end, ext, 0)) != 0) { in x509_get_crl_ext() 102 return ret; in x509_get_crl_ext() 119 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_crl_ext() 121 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_get_crl_ext() 127 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &len, in x509_get_crl_ext() [all …]
|
D | ssl_tls13_client.c | 189 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_reset_key_share() local 195 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_reset_key_share() 196 MBEDTLS_SSL_DEBUG_RET(1, "psa_destroy_key", ret); in ssl_tls13_reset_key_share() 197 return ret; in ssl_tls13_reset_key_share() 219 int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; in ssl_tls13_get_default_group_id() local 247 return ret; in ssl_tls13_get_default_group_id() 273 int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; in ssl_tls13_write_key_share_ext() local 317 ret = mbedtls_ssl_tls13_generate_and_write_ecdh_key_exchange( in ssl_tls13_write_key_share_ext() 320 if (ret != 0) { in ssl_tls13_write_key_share_ext() 321 return ret; in ssl_tls13_write_key_share_ext() [all …]
|
D | dhm.c | 57 int ret, n; in dhm_read_bignum() local 70 if ((ret = mbedtls_mpi_read_binary(X, *p, n)) != 0) { in dhm_read_bignum() 71 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_DHM_READ_PARAMS_FAILED, ret); in dhm_read_bignum() 94 int ret = 0; in dhm_check_range() local 102 ret = MBEDTLS_ERR_DHM_BAD_INPUT_DATA; in dhm_check_range() 107 return ret; in dhm_check_range() 162 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_dhm_read_params() local 164 if ((ret = dhm_read_bignum(&ctx->P, p, end)) != 0 || in mbedtls_dhm_read_params() 165 (ret = dhm_read_bignum(&ctx->G, p, end)) != 0 || in mbedtls_dhm_read_params() 166 (ret = dhm_read_bignum(&ctx->GY, p, end)) != 0) { in mbedtls_dhm_read_params() [all …]
|
D | pkwrite.c | 66 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pk_write_rsa_pubkey() local 73 if ((ret = mbedtls_rsa_export(rsa, NULL, NULL, NULL, NULL, &T)) != 0 || in pk_write_rsa_pubkey() 74 (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { in pk_write_rsa_pubkey() 77 len += ret; in pk_write_rsa_pubkey() 80 if ((ret = mbedtls_rsa_export(rsa, &T, NULL, NULL, NULL, NULL)) != 0 || in pk_write_rsa_pubkey() 81 (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { in pk_write_rsa_pubkey() 84 len += ret; in pk_write_rsa_pubkey() 89 if (ret < 0) { in pk_write_rsa_pubkey() 90 return ret; in pk_write_rsa_pubkey() 108 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pk_write_ec_pubkey() local [all …]
|
D | x509.c | 58 #define CHECK(code) if ((ret = (code)) != 0) { return ret; } 64 return ret; \ 74 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_serial() local 89 if ((ret = mbedtls_asn1_get_len(p, end, &serial->len)) != 0) { in mbedtls_x509_get_serial() 90 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_SERIAL, ret); in mbedtls_x509_get_serial() 108 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_alg_null() local 110 if ((ret = mbedtls_asn1_get_alg_null(p, end, alg)) != 0) { in mbedtls_x509_get_alg_null() 111 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_ALG, ret); in mbedtls_x509_get_alg_null() 123 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_alg() local 125 if ((ret = mbedtls_asn1_get_alg(p, end, alg, params)) != 0) { in mbedtls_x509_get_alg() [all …]
|
D | ssl_tls12_server.c | 298 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_parse_ecjpake_kkpp() local 311 if ((ret = mbedtls_psa_ecjpake_read_round( in ssl_parse_ecjpake_kkpp() 317 MBEDTLS_SSL_DEBUG_RET(1, "psa_pake_input round one", ret); in ssl_parse_ecjpake_kkpp() 323 return ret; in ssl_parse_ecjpake_kkpp() 326 if ((ret = mbedtls_ecjpake_read_round_one(&ssl->handshake->ecjpake_ctx, in ssl_parse_ecjpake_kkpp() 328 MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_ecjpake_read_round_one", ret); in ssl_parse_ecjpake_kkpp() 331 return ret; in ssl_parse_ecjpake_kkpp() 478 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_parse_session_ticket_ext() local 507 if ((ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, &session, in ssl_parse_session_ticket_ext() 511 if (ret == MBEDTLS_ERR_SSL_INVALID_MAC) { in ssl_parse_session_ticket_ext() [all …]
|
D | cmac.c | 116 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in cmac_generate_subkeys() local 125 if ((ret = mbedtls_cipher_update(ctx, L, block_size, L, &olen)) != 0) { in cmac_generate_subkeys() 132 if ((ret = cmac_multiply_by_u(K1, L, block_size)) != 0) { in cmac_generate_subkeys() 136 if ((ret = cmac_multiply_by_u(K2, K1, block_size)) != 0) { in cmac_generate_subkeys() 143 return ret; in cmac_generate_subkeys() 220 int ret = 0; in mbedtls_cipher_cmac_update() local 242 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update() 260 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update() 278 return ret; in mbedtls_cipher_cmac_update() 289 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_cipher_cmac_finish() local [all …]
|
D | x509_crt.c | 406 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_version() local 409 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_version() 412 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_get_version() 417 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_FORMAT, ret); in x509_get_version() 422 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_get_version() 423 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_get_version() 444 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_dates() local 447 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_dates() 449 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_DATE, ret); in x509_get_dates() 454 if ((ret = mbedtls_x509_get_time(p, end, from)) != 0) { in x509_get_dates() [all …]
|
D | ssl_msg.c | 100 int ret = 0; in mbedtls_ssl_check_record() local 108 ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; in mbedtls_ssl_check_record() 115 ret = ssl_parse_record_header(ssl, buf, buflen, &rec); in mbedtls_ssl_check_record() 116 if (ret != 0) { in mbedtls_ssl_check_record() 117 MBEDTLS_SSL_DEBUG_RET(3, "ssl_parse_record_header", ret); in mbedtls_ssl_check_record() 122 ret = mbedtls_ssl_decrypt_buf(ssl, ssl->transform_in, &rec); in mbedtls_ssl_check_record() 123 if (ret != 0) { in mbedtls_ssl_check_record() 124 MBEDTLS_SSL_DEBUG_RET(3, "mbedtls_ssl_decrypt_buf", ret); in mbedtls_ssl_check_record() 138 if (ret == MBEDTLS_ERR_SSL_UNEXPECTED_CID || in mbedtls_ssl_check_record() 139 ret == MBEDTLS_ERR_SSL_EARLY_MESSAGE) { in mbedtls_ssl_check_record() [all …]
|
/mbedtls-3.5.0/programs/ssl/ |
D | ssl_mail_client.c | 163 int ret; in do_handshake() local 174 while ((ret = mbedtls_ssl_handshake(ssl)) != 0) { in do_handshake() 175 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { in do_handshake() 177 mbedtls_strerror(ret, (char *) buf, 1024); in do_handshake() 179 mbedtls_printf(" failed\n ! mbedtls_ssl_handshake returned %d: %s\n\n", ret, buf); in do_handshake() 221 int ret; in write_ssl_data() local 224 while (len && (ret = mbedtls_ssl_write(ssl, buf, len)) <= 0) { in write_ssl_data() 225 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { in write_ssl_data() 226 mbedtls_printf(" failed\n ! mbedtls_ssl_write returned %d\n\n", ret); in write_ssl_data() 236 int ret; in write_ssl_and_get_response() local [all …]
|
D | dtls_server.c | 90 int ret, len; in main() local 132 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 135 printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main() 152 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_srv_crt, in main() 154 if (ret != 0) { in main() 155 printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main() 159 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_cas_pem, in main() 161 if (ret != 0) { in main() 162 printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main() 166 ret = mbedtls_pk_parse_key(&pkey, in main() [all …]
|
D | ssl_server.c | 80 int ret, len; in main() local 117 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 120 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main() 137 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_srv_crt, in main() 139 if (ret != 0) { in main() 140 mbedtls_printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main() 144 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_cas_pem, in main() 146 if (ret != 0) { in main() 147 mbedtls_printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main() 151 ret = mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key, in main() [all …]
|
D | ssl_pthread_server.c | 111 int ret, len; in handle_ssl_connection() local 126 if ((ret = mbedtls_ssl_setup(&ssl, thread_info->config)) != 0) { in handle_ssl_connection() 128 thread_id, (unsigned int) -ret); in handle_ssl_connection() 139 while ((ret = mbedtls_ssl_handshake(&ssl)) != 0) { in handle_ssl_connection() 140 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { in handle_ssl_connection() 142 thread_id, (unsigned int) -ret); in handle_ssl_connection() 157 ret = mbedtls_ssl_read(&ssl, buf, len); in handle_ssl_connection() 159 if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) { in handle_ssl_connection() 163 if (ret <= 0) { in handle_ssl_connection() 164 switch (ret) { in handle_ssl_connection() [all …]
|
D | dtls_client.c | 83 int ret, len; in main() local 117 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 120 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main() 132 ret = mbedtls_x509_crt_parse(&cacert, (const unsigned char *) mbedtls_test_cas_pem, in main() 134 if (ret < 0) { in main() 136 (unsigned int) -ret); in main() 140 mbedtls_printf(" ok (%d skipped)\n", ret); in main() 148 if ((ret = mbedtls_net_connect(&server_fd, SERVER_ADDR, in main() 150 mbedtls_printf(" failed\n ! mbedtls_net_connect returned %d\n\n", ret); in main() 162 if ((ret = mbedtls_ssl_config_defaults(&conf, in main() [all …]
|
D | ssl_fork_server.c | 86 int ret = 1, len, cnt = 0, pid; in main() local 116 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 119 mbedtls_printf(" failed! mbedtls_ctr_drbg_seed returned %d\n\n", ret); in main() 136 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_srv_crt, in main() 138 if (ret != 0) { in main() 139 mbedtls_printf(" failed! mbedtls_x509_crt_parse returned %d\n\n", ret); in main() 143 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_cas_pem, in main() 145 if (ret != 0) { in main() 146 mbedtls_printf(" failed! mbedtls_x509_crt_parse returned %d\n\n", ret); in main() 150 ret = mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key, in main() [all …]
|
D | ssl_client1.c | 69 int ret = 1, len; in main() local 99 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 102 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main() 114 ret = mbedtls_x509_crt_parse(&cacert, (const unsigned char *) mbedtls_test_cas_pem, in main() 116 if (ret < 0) { in main() 118 (unsigned int) -ret); in main() 122 mbedtls_printf(" ok (%d skipped)\n", ret); in main() 130 if ((ret = mbedtls_net_connect(&server_fd, SERVER_NAME, in main() 132 mbedtls_printf(" failed\n ! mbedtls_net_connect returned %d\n\n", ret); in main() 144 if ((ret = mbedtls_ssl_config_defaults(&conf, in main() [all …]
|
D | ssl_client2.c | 614 int ret; in report_cid_usage() local 633 ret = mbedtls_ssl_get_peer_cid(ssl, &cid_negotiated, in report_cid_usage() 635 if (ret != 0) { in report_cid_usage() 637 (unsigned int) -ret); in report_cid_usage() 638 return ret; in report_cid_usage() 652 ret = mbedtls_ssl_get_peer_cid(ssl, &cid_negotiated, in report_cid_usage() 654 if (ret != 0) { in report_cid_usage() 656 (unsigned int) -ret); in report_cid_usage() 657 return ret; in report_cid_usage() 661 ret = mbedtls_ssl_get_peer_cid(ssl, &cid_negotiated, in report_cid_usage() [all …]
|
/mbedtls-3.5.0/programs/pkey/ |
D | dh_server.c | 64 int ret = 1; in main() local 98 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main() 101 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main() 119 if ((ret = mbedtls_mpi_read_file(&N, 16, f)) != 0 || in main() 120 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main() 121 (ret = mbedtls_mpi_read_file(&D, 16, f)) != 0 || in main() 122 (ret = mbedtls_mpi_read_file(&P, 16, f)) != 0 || in main() 123 (ret = mbedtls_mpi_read_file(&Q, 16, f)) != 0) { in main() 125 ret); in main() 131 if ((ret = mbedtls_rsa_import(&rsa, &N, &P, &Q, &D, &E)) != 0) { in main() [all …]
|