Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 208) sorted by relevance

123456789

/mbedtls-3.6.0/library/
Dpkparse.c118 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_pk_parse_keyfile() local
122 if ((ret = mbedtls_pk_load_file(path, &buf, &n)) != 0) { in mbedtls_pk_parse_keyfile()
123 return ret; in mbedtls_pk_parse_keyfile()
127 ret = mbedtls_pk_parse_key(ctx, buf, n, NULL, 0, f_rng, p_rng); in mbedtls_pk_parse_keyfile()
129 ret = mbedtls_pk_parse_key(ctx, buf, n, in mbedtls_pk_parse_keyfile()
135 return ret; in mbedtls_pk_parse_keyfile()
143 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_pk_parse_public_keyfile() local
147 if ((ret = mbedtls_pk_load_file(path, &buf, &n)) != 0) { in mbedtls_pk_parse_public_keyfile()
148 return ret; in mbedtls_pk_parse_public_keyfile()
151 ret = mbedtls_pk_parse_public_key(ctx, buf, n); in mbedtls_pk_parse_public_keyfile()
[all …]
Dpkcs7.c43 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pkcs7_get_next_content_len() local
45 ret = mbedtls_asn1_get_tag(p, end, len, MBEDTLS_ASN1_CONSTRUCTED in pkcs7_get_next_content_len()
47 if (ret != 0) { in pkcs7_get_next_content_len()
48 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_CONTENT_INFO, ret); in pkcs7_get_next_content_len()
50 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_CONTENT_INFO, in pkcs7_get_next_content_len()
54 return ret; in pkcs7_get_next_content_len()
63 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pkcs7_get_version() local
65 ret = mbedtls_asn1_get_int(p, end, ver); in pkcs7_get_version()
66 if (ret != 0) { in pkcs7_get_version()
67 ret = MBEDTLS_ERROR_ADD(MBEDTLS_ERR_PKCS7_INVALID_VERSION, ret); in pkcs7_get_version()
[all …]
Dx509_csr.c46 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_csr_get_version() local
48 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_csr_get_version()
49 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_csr_get_version()
54 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_csr_get_version()
66 int ret; in x509_csr_parse_extensions() local
74 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_csr_parse_extensions()
76 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_csr_parse_extensions()
82 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &extn_oid.len, in x509_csr_parse_extensions()
84 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_csr_parse_extensions()
92 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &len, in x509_csr_parse_extensions()
[all …]
Dssl_tls13_keys.c239 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_make_traffic_key() local
241 ret = mbedtls_ssl_tls13_hkdf_expand_label( in ssl_tls13_make_traffic_key()
247 if (ret != 0) { in ssl_tls13_make_traffic_key()
248 return ret; in ssl_tls13_make_traffic_key()
251 ret = mbedtls_ssl_tls13_hkdf_expand_label( in ssl_tls13_make_traffic_key()
257 return ret; in ssl_tls13_make_traffic_key()
283 int ret = 0; in mbedtls_ssl_tls13_make_traffic_keys() local
285 ret = ssl_tls13_make_traffic_key( in mbedtls_ssl_tls13_make_traffic_keys()
289 if (ret != 0) { in mbedtls_ssl_tls13_make_traffic_keys()
290 return ret; in mbedtls_ssl_tls13_make_traffic_keys()
[all …]
Dssl_tls13_server.c106 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_offered_psks_check_identity_match_ticket() local
135 if ((ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, in ssl_tls13_offered_psks_check_identity_match_ticket()
138 if (ret == MBEDTLS_ERR_SSL_INVALID_MAC) { in ssl_tls13_offered_psks_check_identity_match_ticket()
140 } else if (ret == MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED) { in ssl_tls13_offered_psks_check_identity_match_ticket()
143 MBEDTLS_SSL_DEBUG_RET(1, "ticket_parse", ret); in ssl_tls13_offered_psks_check_identity_match_ticket()
150 if (ret != 0) { in ssl_tls13_offered_psks_check_identity_match_ticket()
162 ret = MBEDTLS_ERR_ERROR_GENERIC_ERROR; in ssl_tls13_offered_psks_check_identity_match_ticket()
174 ret = MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED; in ssl_tls13_offered_psks_check_identity_match_ticket()
228 ret = 0; in ssl_tls13_offered_psks_check_identity_match_ticket()
233 if (ret != 0) { in ssl_tls13_offered_psks_check_identity_match_ticket()
[all …]
Dentropy.c86 int idx, ret = 0; in mbedtls_entropy_add_source() local
89 if ((ret = mbedtls_mutex_lock(&ctx->mutex)) != 0) { in mbedtls_entropy_add_source()
90 return ret; in mbedtls_entropy_add_source()
96 ret = MBEDTLS_ERR_ENTROPY_MAX_SOURCES; in mbedtls_entropy_add_source()
114 return ret; in mbedtls_entropy_add_source()
127 int ret = 0; in entropy_update() local
130 if ((ret = mbedtls_md(mbedtls_md_info_from_type(MBEDTLS_ENTROPY_MD), in entropy_update()
147 ret = mbedtls_md_setup(&ctx->accumulator, in entropy_update()
149 if (ret != 0) { in entropy_update()
152 ret = mbedtls_md_starts(&ctx->accumulator); in entropy_update()
[all …]
Dchachapoly.c97 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_chachapoly_setkey() local
99 ret = mbedtls_chacha20_setkey(&ctx->chacha20_ctx, key); in mbedtls_chachapoly_setkey()
101 return ret; in mbedtls_chachapoly_setkey()
108 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_chachapoly_starts() local
112 ret = mbedtls_chacha20_starts(&ctx->chacha20_ctx, nonce, 0U); in mbedtls_chachapoly_starts()
113 if (ret != 0) { in mbedtls_chachapoly_starts()
123 ret = mbedtls_chacha20_update(&ctx->chacha20_ctx, sizeof(poly1305_key), in mbedtls_chachapoly_starts()
125 if (ret != 0) { in mbedtls_chachapoly_starts()
129 ret = mbedtls_poly1305_starts(&ctx->poly1305_ctx, poly1305_key); in mbedtls_chachapoly_starts()
131 if (ret == 0) { in mbedtls_chachapoly_starts()
[all …]
Dx509_crl.c54 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_crl_get_version() local
56 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_crl_get_version()
57 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_crl_get_version()
62 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_crl_get_version()
79 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_crl_ext() local
89 if ((ret = mbedtls_x509_get_ext(p, end, ext, 0)) != 0) { in x509_get_crl_ext()
90 return ret; in x509_get_crl_ext()
107 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_crl_ext()
109 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_EXTENSIONS, ret); in x509_get_crl_ext()
115 if ((ret = mbedtls_asn1_get_tag(p, end_ext_data, &len, in x509_get_crl_ext()
[all …]
Dssl_tls13_client.c186 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_tls13_reset_key_share() local
192 ret = PSA_TO_MBEDTLS_ERR(status); in ssl_tls13_reset_key_share()
193 MBEDTLS_SSL_DEBUG_RET(1, "psa_destroy_key", ret); in ssl_tls13_reset_key_share()
194 return ret; in ssl_tls13_reset_key_share()
216 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
318 ret = mbedtls_ssl_tls13_generate_and_write_xxdh_key_exchange( in ssl_tls13_write_key_share_ext()
321 if (ret != 0) { in ssl_tls13_write_key_share_ext()
322 return ret; in ssl_tls13_write_key_share_ext()
[all …]
Ddhm.c45 int ret, n; in dhm_read_bignum() local
58 if ((ret = mbedtls_mpi_read_binary(X, *p, n)) != 0) { in dhm_read_bignum()
59 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_DHM_READ_PARAMS_FAILED, ret); in dhm_read_bignum()
82 int ret = 0; in dhm_check_range() local
90 ret = MBEDTLS_ERR_DHM_BAD_INPUT_DATA; in dhm_check_range()
95 return ret; in dhm_check_range()
150 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_dhm_read_params() local
152 if ((ret = dhm_read_bignum(&ctx->P, p, end)) != 0 || in mbedtls_dhm_read_params()
153 (ret = dhm_read_bignum(&ctx->G, p, end)) != 0 || in mbedtls_dhm_read_params()
154 (ret = dhm_read_bignum(&ctx->GY, p, end)) != 0) { in mbedtls_dhm_read_params()
[all …]
Dx509.c48 if ((ret = (code)) != 0) { \
49 return ret; \
56 return ret; \
66 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_serial() local
81 if ((ret = mbedtls_asn1_get_len(p, end, &serial->len)) != 0) { in mbedtls_x509_get_serial()
82 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_SERIAL, ret); in mbedtls_x509_get_serial()
100 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_alg_null() local
102 if ((ret = mbedtls_asn1_get_alg_null(p, end, alg)) != 0) { in mbedtls_x509_get_alg_null()
103 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_ALG, ret); in mbedtls_x509_get_alg_null()
115 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_x509_get_alg() local
[all …]
Dssl_tls12_server.c294 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_parse_ecjpake_kkpp() local
307 if ((ret = mbedtls_psa_ecjpake_read_round( in ssl_parse_ecjpake_kkpp()
313 MBEDTLS_SSL_DEBUG_RET(1, "psa_pake_input round one", ret); in ssl_parse_ecjpake_kkpp()
319 return ret; in ssl_parse_ecjpake_kkpp()
322 if ((ret = mbedtls_ecjpake_read_round_one(&ssl->handshake->ecjpake_ctx, in ssl_parse_ecjpake_kkpp()
324 MBEDTLS_SSL_DEBUG_RET(1, "mbedtls_ecjpake_read_round_one", ret); in ssl_parse_ecjpake_kkpp()
327 return ret; in ssl_parse_ecjpake_kkpp()
474 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in ssl_parse_session_ticket_ext() local
503 if ((ret = ssl->conf->f_ticket_parse(ssl->conf->p_ticket, &session, in ssl_parse_session_ticket_ext()
507 if (ret == MBEDTLS_ERR_SSL_INVALID_MAC) { in ssl_parse_session_ticket_ext()
[all …]
Dcmac.c104 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in cmac_generate_subkeys() local
113 if ((ret = mbedtls_cipher_update(ctx, L, block_size, L, &olen)) != 0) { in cmac_generate_subkeys()
120 if ((ret = cmac_multiply_by_u(K1, L, block_size)) != 0) { in cmac_generate_subkeys()
124 if ((ret = cmac_multiply_by_u(K2, K1, block_size)) != 0) { in cmac_generate_subkeys()
131 return ret; in cmac_generate_subkeys()
208 int ret = 0; in mbedtls_cipher_cmac_update() local
230 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update()
248 if ((ret = mbedtls_cipher_update(ctx, state, block_size, state, in mbedtls_cipher_cmac_update()
266 return ret; in mbedtls_cipher_cmac_update()
277 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_cipher_cmac_finish() local
[all …]
Dx509_crt.c396 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_version() local
399 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_version()
402 if (ret == MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) { in x509_get_version()
407 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_FORMAT, ret); in x509_get_version()
412 if ((ret = mbedtls_asn1_get_int(p, end, ver)) != 0) { in x509_get_version()
413 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_VERSION, ret); in x509_get_version()
434 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in x509_get_dates() local
437 if ((ret = mbedtls_asn1_get_tag(p, end, &len, in x509_get_dates()
439 return MBEDTLS_ERROR_ADD(MBEDTLS_ERR_X509_INVALID_DATE, ret); in x509_get_dates()
444 if ((ret = mbedtls_x509_get_time(p, end, from)) != 0) { in x509_get_dates()
[all …]
Dpkwrite.c114 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pk_write_rsa_pubkey() local
122 if ((ret = mbedtls_rsa_export(rsa, NULL, NULL, NULL, NULL, &T)) != 0 || in pk_write_rsa_pubkey()
123 (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { in pk_write_rsa_pubkey()
126 len += ret; in pk_write_rsa_pubkey()
129 if ((ret = mbedtls_rsa_export(rsa, &T, NULL, NULL, NULL, NULL)) != 0 || in pk_write_rsa_pubkey()
130 (ret = mbedtls_asn1_write_mpi(p, start, &T)) < 0) { in pk_write_rsa_pubkey()
133 len += ret; in pk_write_rsa_pubkey()
138 if (ret < 0) { in pk_write_rsa_pubkey()
139 return ret; in pk_write_rsa_pubkey()
187 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in pk_write_ec_pubkey() local
[all …]
Dssl_msg.c219 int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; in mbedtls_ct_hmac() local
225 ret = (func_call); \ in mbedtls_ct_hmac()
226 if (ret != 0) \ in mbedtls_ct_hmac()
272 return ret; in mbedtls_ct_hmac()
322 int ret = 0; in mbedtls_ssl_check_record() local
330 ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; in mbedtls_ssl_check_record()
337 ret = ssl_parse_record_header(ssl, buf, buflen, &rec); in mbedtls_ssl_check_record()
338 if (ret != 0) { in mbedtls_ssl_check_record()
339 MBEDTLS_SSL_DEBUG_RET(3, "ssl_parse_record_header", ret); in mbedtls_ssl_check_record()
344 ret = mbedtls_ssl_decrypt_buf(ssl, ssl->transform_in, &rec); in mbedtls_ssl_check_record()
[all …]
/mbedtls-3.6.0/programs/ssl/
Dssl_mail_client.c151 int ret; in do_handshake() local
162 while ((ret = mbedtls_ssl_handshake(ssl)) != 0) { in do_handshake()
163 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { in do_handshake()
165 mbedtls_strerror(ret, (char *) buf, 1024); in do_handshake()
167 mbedtls_printf(" failed\n ! mbedtls_ssl_handshake returned %d: %s\n\n", ret, buf); in do_handshake()
209 int ret; in write_ssl_data() local
212 while (len && (ret = mbedtls_ssl_write(ssl, buf, len)) <= 0) { in write_ssl_data()
213 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { in write_ssl_data()
214 mbedtls_printf(" failed\n ! mbedtls_ssl_write returned %d\n\n", ret); in write_ssl_data()
224 int ret; in write_ssl_and_get_response() local
[all …]
Ddtls_server.c78 int ret, len; in main() local
115 ret = MBEDTLS_ERR_SSL_HW_ACCEL_FAILED; in main()
130 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
133 printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main()
150 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_srv_crt, in main()
152 if (ret != 0) { in main()
153 printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main()
157 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_cas_pem, in main()
159 if (ret != 0) { in main()
160 printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main()
[all …]
Dssl_server.c68 int ret, len; in main() local
100 ret = MBEDTLS_ERR_SSL_HW_ACCEL_FAILED; in main()
115 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
118 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main()
135 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_srv_crt, in main()
137 if (ret != 0) { in main()
138 mbedtls_printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main()
142 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_cas_pem, in main()
144 if (ret != 0) { in main()
145 mbedtls_printf(" failed\n ! mbedtls_x509_crt_parse returned %d\n\n", ret); in main()
[all …]
Dssl_pthread_server.c99 int ret, len; in handle_ssl_connection() local
114 if ((ret = mbedtls_ssl_setup(&ssl, thread_info->config)) != 0) { in handle_ssl_connection()
116 thread_id, (unsigned int) -ret); in handle_ssl_connection()
127 while ((ret = mbedtls_ssl_handshake(&ssl)) != 0) { in handle_ssl_connection()
128 if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) { in handle_ssl_connection()
130 thread_id, (unsigned int) -ret); in handle_ssl_connection()
145 ret = mbedtls_ssl_read(&ssl, buf, len); in handle_ssl_connection()
147 if (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE) { in handle_ssl_connection()
151 if (ret <= 0) { in handle_ssl_connection()
152 switch (ret) { in handle_ssl_connection()
[all …]
Ddtls_client.c71 int ret, len; in main() local
107 ret = MBEDTLS_ERR_SSL_HW_ACCEL_FAILED; in main()
115 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
118 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main()
130 ret = mbedtls_x509_crt_parse(&cacert, (const unsigned char *) mbedtls_test_cas_pem, in main()
132 if (ret < 0) { in main()
134 (unsigned int) -ret); in main()
138 mbedtls_printf(" ok (%d skipped)\n", ret); in main()
146 if ((ret = mbedtls_net_connect(&server_fd, SERVER_ADDR, in main()
148 mbedtls_printf(" failed\n ! mbedtls_net_connect returned %d\n\n", ret); in main()
[all …]
Dssl_fork_server.c74 int ret = 1, len, cnt = 0, pid; in main() local
113 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
116 mbedtls_printf(" failed! mbedtls_ctr_drbg_seed returned %d\n\n", ret); in main()
133 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_srv_crt, in main()
135 if (ret != 0) { in main()
136 mbedtls_printf(" failed! mbedtls_x509_crt_parse returned %d\n\n", ret); in main()
140 ret = mbedtls_x509_crt_parse(&srvcert, (const unsigned char *) mbedtls_test_cas_pem, in main()
142 if (ret != 0) { in main()
143 mbedtls_printf(" failed! mbedtls_x509_crt_parse returned %d\n\n", ret); in main()
147 ret = mbedtls_pk_parse_key(&pkey, (const unsigned char *) mbedtls_test_srv_key, in main()
[all …]
Dssl_client2.c603 int ret; in report_cid_usage() local
622 ret = mbedtls_ssl_get_peer_cid(ssl, &cid_negotiated, in report_cid_usage()
624 if (ret != 0) { in report_cid_usage()
626 (unsigned int) -ret); in report_cid_usage()
627 return ret; in report_cid_usage()
641 ret = mbedtls_ssl_get_peer_cid(ssl, &cid_negotiated, in report_cid_usage()
643 if (ret != 0) { in report_cid_usage()
645 (unsigned int) -ret); in report_cid_usage()
646 return ret; in report_cid_usage()
650 ret = mbedtls_ssl_get_peer_cid(ssl, &cid_negotiated, in report_cid_usage()
[all …]
Dssl_client1.c57 int ret = 1, len; in main() local
97 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
100 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main()
112 ret = mbedtls_x509_crt_parse(&cacert, (const unsigned char *) mbedtls_test_cas_pem, in main()
114 if (ret < 0) { in main()
116 (unsigned int) -ret); in main()
120 mbedtls_printf(" ok (%d skipped)\n", ret); in main()
128 if ((ret = mbedtls_net_connect(&server_fd, SERVER_NAME, in main()
130 mbedtls_printf(" failed\n ! mbedtls_net_connect returned %d\n\n", ret); in main()
142 if ((ret = mbedtls_ssl_config_defaults(&conf, in main()
[all …]
/mbedtls-3.6.0/programs/pkey/
Ddh_server.c54 int ret = 1; in main() local
88 if ((ret = mbedtls_ctr_drbg_seed(&ctr_drbg, mbedtls_entropy_func, &entropy, in main()
91 mbedtls_printf(" failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret); in main()
109 if ((ret = mbedtls_mpi_read_file(&N, 16, f)) != 0 || in main()
110 (ret = mbedtls_mpi_read_file(&E, 16, f)) != 0 || in main()
111 (ret = mbedtls_mpi_read_file(&D, 16, f)) != 0 || in main()
112 (ret = mbedtls_mpi_read_file(&P, 16, f)) != 0 || in main()
113 (ret = mbedtls_mpi_read_file(&Q, 16, f)) != 0) { in main()
115 ret); in main()
121 if ((ret = mbedtls_rsa_import(&rsa, &N, &P, &Q, &D, &E)) != 0) { in main()
[all …]

123456789