/third_party/mbedtls/3rdparty/everest/library/ |
D | x25519.c | 59 int mbedtls_x25519_make_params( mbedtls_x25519_context *ctx, size_t *olen, in mbedtls_x25519_make_params() argument 71 *olen = MBEDTLS_X25519_KEY_SIZE_BYTES + 4; in mbedtls_x25519_make_params() 72 if( blen < *olen ) in mbedtls_x25519_make_params() 107 size_t olen = 0; in mbedtls_x25519_get_params() local 111 …return mbedtls_ecp_point_write_binary( &key->grp, &key->Q, MBEDTLS_ECP_PF_COMPRESSED, &olen, ctx->… in mbedtls_x25519_get_params() 119 int mbedtls_x25519_calc_secret( mbedtls_x25519_context *ctx, size_t *olen, in mbedtls_x25519_calc_secret() argument 129 *olen = MBEDTLS_X25519_KEY_SIZE_BYTES; in mbedtls_x25519_calc_secret() 131 if( blen < *olen ) in mbedtls_x25519_calc_secret() 145 int mbedtls_x25519_make_public( mbedtls_x25519_context *ctx, size_t *olen, in mbedtls_x25519_make_public() argument 159 *olen = MBEDTLS_X25519_KEY_SIZE_BYTES + 1; in mbedtls_x25519_make_public() [all …]
|
D | everest.c | 53 int mbedtls_everest_make_params( mbedtls_ecdh_context_everest *ctx, size_t *olen, in mbedtls_everest_make_params() argument 59 return mbedtls_x25519_make_params( x25519_ctx, olen, buf, blen, f_rng, p_rng ); in mbedtls_everest_make_params() 81 int mbedtls_everest_make_public( mbedtls_ecdh_context_everest *ctx, size_t *olen, in mbedtls_everest_make_public() argument 87 return mbedtls_x25519_make_public( x25519_ctx, olen, buf, blen, f_rng, p_rng ); in mbedtls_everest_make_public() 97 int mbedtls_everest_calc_secret( mbedtls_ecdh_context_everest *ctx, size_t *olen, in mbedtls_everest_calc_secret() argument 103 return mbedtls_x25519_calc_secret( x25519_ctx, olen, buf, blen, f_rng, p_rng ); in mbedtls_everest_calc_secret()
|
/third_party/mbedtls/library/ |
D | entropy_poll.c | 59 size_t *olen ) in mbedtls_platform_entropy_poll() argument 63 *olen = 0; in mbedtls_platform_entropy_poll() 78 *olen = len; in mbedtls_platform_entropy_poll() 162 unsigned char *output, size_t len, size_t *olen ) in mbedtls_platform_entropy_poll() argument 173 *olen = ret; in mbedtls_platform_entropy_poll() 188 *olen = len; in mbedtls_platform_entropy_poll() 192 *olen = 0; in mbedtls_platform_entropy_poll() 206 *olen = len; in mbedtls_platform_entropy_poll() 216 unsigned char *output, size_t len, size_t *olen ) in mbedtls_nv_seed_poll() argument 231 *olen = use_len; in mbedtls_nv_seed_poll()
|
D | cipher.c | 514 size_t ilen, unsigned char *output, size_t *olen ) in mbedtls_cipher_update() argument 522 CIPHER_VALIDATE_RET( olen != NULL ); in mbedtls_cipher_update() 536 *olen = 0; in mbedtls_cipher_update() 548 *olen = ilen; in mbedtls_cipher_update() 564 output, ilen, olen ) ); in mbedtls_cipher_update() 573 output, ilen, olen ) ); in mbedtls_cipher_update() 580 *olen = ilen; in mbedtls_cipher_update() 631 *olen += block_size; in mbedtls_cipher_update() 674 *olen += ilen; in mbedtls_cipher_update() 691 *olen = ilen; in mbedtls_cipher_update() [all …]
|
D | nist_kw.c | 149 size_t olen, padlen = 0; in mbedtls_nist_kw_wrap() local 222 inbuff, 16, output, &olen ); in mbedtls_nist_kw_wrap() 247 inbuff, 16, outbuff, &olen ); in mbedtls_nist_kw_wrap() 290 size_t olen; in unwrap() local 315 inbuff, 16, outbuff, &olen ); in unwrap() 351 size_t i, olen; in mbedtls_nist_kw_unwrap() local 412 input, 16, outbuff, &olen ); in mbedtls_nist_kw_unwrap() 589 size_t olen; in mbedtls_nist_kw_self_test() local 610 kw_msg_len[i], out, &olen, sizeof( out ) ); in mbedtls_nist_kw_self_test() 611 if( ret != 0 || kw_out_len[i] != olen || in mbedtls_nist_kw_self_test() [all …]
|
D | base64.c | 44 int mbedtls_base64_encode( unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_encode() argument 53 *olen = 0; in mbedtls_base64_encode() 61 *olen = BASE64_SIZE_T_MAX; in mbedtls_base64_encode() 69 *olen = n + 1; in mbedtls_base64_encode() 105 *olen = p - dst; in mbedtls_base64_encode() 114 int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, in mbedtls_base64_decode() argument 171 *olen = 0; in mbedtls_base64_decode() 184 *olen = n; in mbedtls_base64_decode() 209 *olen = p - dst; in mbedtls_base64_decode()
|
D | ssl_cli.c | 97 size_t *olen ) in mbedtls_ssl_write_hostname_ext() argument 102 *olen = 0; in mbedtls_ssl_write_hostname_ext() 157 *olen = hostname_len + 9; in mbedtls_ssl_write_hostname_ext() 167 size_t *olen ) in ssl_write_renegotiation_ext() argument 171 *olen = 0; in ssl_write_renegotiation_ext() 196 *olen = 5 + ssl->verify_data_len; in ssl_write_renegotiation_ext() 210 size_t *olen ) in ssl_write_signature_algorithms_ext() argument 220 *olen = 0; in ssl_write_signature_algorithms_ext() 296 *olen = 6 + sig_alg_len; in ssl_write_signature_algorithms_ext() 308 size_t *olen ) in ssl_write_supported_elliptic_curves_ext() argument [all …]
|
D | ecdh.c | 299 size_t *olen, int point_format, in ecdh_make_params_internal() argument 345 *olen = grp_len + pt_len; in ecdh_make_params_internal() 356 int mbedtls_ecdh_make_params( mbedtls_ecdh_context *ctx, size_t *olen, in mbedtls_ecdh_make_params() argument 363 ECDH_VALIDATE_RET( olen != NULL ); in mbedtls_ecdh_make_params() 374 return( ecdh_make_params_internal( ctx, olen, ctx->point_format, buf, blen, in mbedtls_ecdh_make_params() 381 return( mbedtls_everest_make_params( &ctx->ctx.everest_ecdh, olen, in mbedtls_ecdh_make_params() 385 return( ecdh_make_params_internal( &ctx->ctx.mbed_ecdh, olen, in mbedtls_ecdh_make_params() 522 size_t *olen, int point_format, in ecdh_make_public_internal() argument 555 return mbedtls_ecp_tls_write_point( &ctx->grp, &ctx->Q, point_format, olen, in ecdh_make_public_internal() 562 int mbedtls_ecdh_make_public( mbedtls_ecdh_context *ctx, size_t *olen, in mbedtls_ecdh_make_public() argument [all …]
|
D | gcm.c | 84 size_t olen = 0; in gcm_gen_table() local 87 if( ( ret = mbedtls_cipher_update( &ctx->cipher_ctx, h, 16, h, &olen ) ) != 0 ) in gcm_gen_table() 256 size_t use_len, olen = 0; in mbedtls_gcm_starts() local 306 ctx->base_ectr, &olen ) ) != 0 ) in mbedtls_gcm_starts() 403 size_t olen = 0; in gcm_mask() local 407 &olen ) ) != 0 ) in gcm_mask() 581 size_t olen; in mbedtls_gcm_crypt_and_tag() local 597 output, length, &olen ) ) != 0 ) in mbedtls_gcm_crypt_and_tag() 600 if( ( ret = mbedtls_gcm_finish( ctx, NULL, 0, &olen, tag, tag_len ) ) != 0 ) in mbedtls_gcm_crypt_and_tag() 894 size_t olen; in mbedtls_gcm_self_test() local [all …]
|
D | rsa.c | 742 size_t olen; in mbedtls_rsa_public() local 766 olen = ctx->len; in mbedtls_rsa_public() 768 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &T, output, olen ) ); in mbedtls_rsa_public() 880 size_t olen; in mbedtls_rsa_private() local 1056 olen = ctx->len; in mbedtls_rsa_private() 1057 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &T, output, olen ) ); in mbedtls_rsa_private() 1161 size_t olen; in mbedtls_rsa_rsaes_oaep_encrypt() local 1180 olen = ctx->len; in mbedtls_rsa_rsaes_oaep_encrypt() 1184 if( ilen + 2 * hlen + 2 < ilen || olen < ilen + 2 * hlen + 2 ) in mbedtls_rsa_rsaes_oaep_encrypt() 1187 memset( output, 0, olen ); in mbedtls_rsa_rsaes_oaep_encrypt() [all …]
|
D | ssl_srv.c | 1943 size_t *olen ) in ssl_write_cid_ext() argument 1949 *olen = 0; in ssl_write_cid_ext() 1983 *olen = ssl->own_cid_len + 5; in ssl_write_cid_ext() 1990 size_t *olen ) in ssl_write_encrypt_then_mac_ext() argument 1998 *olen = 0; in ssl_write_encrypt_then_mac_ext() 2013 *olen = 0; in ssl_write_encrypt_then_mac_ext() 2025 *olen = 4; in ssl_write_encrypt_then_mac_ext() 2032 size_t *olen ) in ssl_write_extended_ms_ext() argument 2038 *olen = 0; in ssl_write_extended_ms_ext() 2051 *olen = 4; in ssl_write_extended_ms_ext() [all …]
|
/third_party/mbedtls/tests/suites/ |
D | test_suite_gcm.function | 21 size_t olen; 37 olen = 0xdeadbeef; 38 TEST_EQUAL( 0, mbedtls_gcm_update( ctx, input->x, n1, output, n1, &olen ) ); 39 TEST_EQUAL( n1, olen ); 40 ASSERT_COMPARE( output, olen, expected_output->x, n1 ); 45 olen = 0xdeadbeef; 46 TEST_EQUAL( 0, mbedtls_gcm_update( ctx, input->x + n1, n2, output, n2, &olen ) ); 47 TEST_EQUAL( n2, olen ); 48 ASSERT_COMPARE( output, olen, expected_output->x + n1, n2 ); 53 TEST_EQUAL( 0, mbedtls_gcm_finish( ctx, NULL, 0, &olen, output, tag->len ) ); [all …]
|
D | test_suite_pem.function | 14 size_t olen = 0, olen2 = 0; 17 ret = mbedtls_pem_write_buffer( start, end, buf->x, buf->len, NULL, 0, &olen ); 20 check_buf = (unsigned char *) mbedtls_calloc( 1, olen ); 23 ret = mbedtls_pem_write_buffer( start, end, buf->x, buf->len, check_buf, olen, &olen2 ); 25 TEST_ASSERT( olen2 <= olen ); 26 TEST_ASSERT( olen > strlen( (char*) result_str ) ); 28 TEST_ASSERT( strncmp( (char *) check_buf, (char *) result_str, olen ) == 0 );
|
D | test_suite_ccm.function | 21 size_t olen; 36 olen = 0xdeadbeef; 37 TEST_EQUAL( 0, mbedtls_ccm_update( ctx, input->x, n1, output, n1, &olen ) ); 38 TEST_EQUAL( n1, olen ); 39 ASSERT_COMPARE( output, olen, expected_output->x, n1 ); 44 olen = 0xdeadbeef; 45 TEST_EQUAL( 0, mbedtls_ccm_update( ctx, input->x + n1, n2, output, n2, &olen ) ); 46 TEST_EQUAL( n2, olen ); 47 ASSERT_COMPARE( output, olen, expected_output->x + n1, n2 ); 240 size_t olen; [all …]
|
/third_party/openssl/crypto/kdf/ |
D | tls1_prf.c | 19 unsigned char *out, size_t olen); 178 unsigned char *out, size_t olen) in tls1_prf_P_hash() argument 215 if (olen > (size_t)chunk && !EVP_MD_CTX_copy_ex(ctx_tmp, ctx)) in tls1_prf_P_hash() 220 if (olen > (size_t)chunk) { in tls1_prf_P_hash() 225 olen -= mac_len; in tls1_prf_P_hash() 233 memcpy(out, A1, olen); in tls1_prf_P_hash() 250 unsigned char *out, size_t olen) in tls1_prf_alg() argument 257 seed, seed_len, out, olen)) in tls1_prf_alg() 260 if ((tmp = OPENSSL_malloc(olen)) == NULL) { in tls1_prf_alg() 265 seed, seed_len, tmp, olen)) { in tls1_prf_alg() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/utils/ |
D | base64.c | 28 size_t olen; in base64_gen_encode() local 33 olen = len * 4 / 3 + 4; /* 3-byte blocks to 4-byte */ in base64_gen_encode() 35 olen += olen / 72; /* line feeds */ in base64_gen_encode() 36 olen++; /* nul termination */ in base64_gen_encode() 37 if (olen < len) in base64_gen_encode() 39 out = os_malloc(olen); in base64_gen_encode() 91 size_t i, count, olen; in base64_gen_decode() local 110 olen = (count + extra_pad) / 4 * 3; in base64_gen_decode() 111 pos = out = os_malloc(olen); in base64_gen_decode()
|
/third_party/mbedtls/programs/aes/ |
D | crypt_and_hash.c | 86 size_t keylen, ilen, olen; in main() local 388 if( mbedtls_cipher_update( &cipher_ctx, buffer, ilen, output, &olen ) != 0 ) in main() 394 if( mbedtls_md_hmac_update( &md_ctx, output, olen ) != 0 ) in main() 400 if( fwrite( output, 1, olen, fout ) != olen ) in main() 402 mbedtls_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); in main() 407 if( mbedtls_cipher_finish( &cipher_ctx, output, &olen ) != 0 ) in main() 412 if( mbedtls_md_hmac_update( &md_ctx, output, olen ) != 0 ) in main() 418 if( fwrite( output, 1, olen, fout ) != olen ) in main() 420 mbedtls_fprintf( stderr, "fwrite(%ld bytes) failed\n", (long) olen ); in main() 570 &olen ) != 0 ) in main() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/utils/ |
D | base64.c | 31 size_t olen; in base64_gen_encode() local 36 olen = len * 4 / 3 + 4; /* 3-byte blocks to 4-byte */ in base64_gen_encode() 38 olen += olen / 72; /* line feeds */ in base64_gen_encode() 39 olen++; /* nul termination */ in base64_gen_encode() 40 if (olen < len) in base64_gen_encode() 42 out = os_malloc(olen); in base64_gen_encode() 93 size_t i, count, olen; in base64_gen_decode() local 112 olen = (count + extra_pad) / 4 * 3; in base64_gen_decode() 113 pos = out = os_malloc(olen); in base64_gen_decode()
|
/third_party/curl/tests/unit/ |
D | unit1655.c | 102 size_t olen = 100000; variable 111 &olen); 131 fail_unless(olen <= sizeof(victim.dohbuffer), "wrote outside bounds"); 132 fail_unless(olen > strlen(name), "unrealistic low size"); 150 size_t olen; variable 172 ret = doh_encode(sunshine1, dnstype, buffer, olen1 - 1, &olen); 176 ret = doh_encode(sunshine1, dnstype, buffer, olen1, &olen); 178 fail_unless(olen == olen1, "bad buffer length");
|
/third_party/toybox/toys/posix/ |
D | uudecode.c | 54 int olen; local 63 olen = 0; 65 if (!m) olen = (*(in++) - 32) & 0x3f; 72 if (olen < 1) break; 73 if (olen < 3) len = olen + 1; 97 olen--;
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/ap/ |
D | fils_hlp.c | 59 u8 opt, olen; in fils_dhcp_request() local 66 olen = *pos++; in fils_dhcp_request() 67 if (olen > end - pos) in fils_dhcp_request() 72 if (olen > 0) in fils_dhcp_request() 80 os_memmove(pos, pos + 2 + olen, end - pos - 2 - olen); in fils_dhcp_request() 81 end -= 2 + olen; in fils_dhcp_request() 82 olen = 0; in fils_dhcp_request() 85 pos += olen; in fils_dhcp_request() 98 u8 opt, olen; in fils_dhcp_request() local 105 olen = *pos++; in fils_dhcp_request() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/ap/ |
D | fils_hlp.c | 59 u8 opt, olen; in fils_dhcp_request() local 66 olen = *pos++; in fils_dhcp_request() 67 if (olen > end - pos) in fils_dhcp_request() 72 if (olen > 0) in fils_dhcp_request() 80 os_memmove(pos, pos + 2 + olen, end - pos - 2 - olen); in fils_dhcp_request() 81 end -= 2 + olen; in fils_dhcp_request() 82 olen = 0; in fils_dhcp_request() 85 pos += olen; in fils_dhcp_request() 98 u8 opt, olen; in fils_dhcp_request() local 105 olen = *pos++; in fils_dhcp_request() [all …]
|
/third_party/curl/lib/ |
D | escape.c | 144 char **ostring, size_t *olen, in Curl_urldecode() argument 201 if(olen) in Curl_urldecode() 203 *olen = strindex; in Curl_urldecode() 218 int length, int *olen) in curl_easy_unescape() argument 229 if(olen) { in curl_easy_unescape() 231 *olen = curlx_uztosi(outputlen); in curl_easy_unescape()
|
/third_party/mbedtls/tests/src/ |
D | helpers.c | 195 unsigned char *mbedtls_test_unhexify_alloc( const char *ibuf, size_t *olen ) in mbedtls_test_unhexify_alloc() argument 200 *olen = strlen( ibuf ) / 2; in mbedtls_test_unhexify_alloc() 202 if( *olen == 0 ) in mbedtls_test_unhexify_alloc() 203 return( mbedtls_test_zero_alloc( *olen ) ); in mbedtls_test_unhexify_alloc() 205 obuf = mbedtls_calloc( 1, *olen ); in mbedtls_test_unhexify_alloc() 207 TEST_HELPER_ASSERT( mbedtls_test_unhexify( obuf, *olen, ibuf, &len ) == 0 ); in mbedtls_test_unhexify_alloc()
|
/third_party/openssl/crypto/cms/ |
D | cms_pwri.c | 236 size_t olen; in kek_wrap_key() local 242 olen = (inlen + 4 + blocklen - 1) / blocklen; in kek_wrap_key() 243 olen *= blocklen; in kek_wrap_key() 244 if (olen < 2 * blocklen) { in kek_wrap_key() 260 if (olen > inlen + 4 in kek_wrap_key() 261 && RAND_bytes(out + 4 + inlen, olen - 4 - inlen) <= 0) in kek_wrap_key() 264 if (!EVP_EncryptUpdate(ctx, out, &dummy, out, olen) in kek_wrap_key() 265 || !EVP_EncryptUpdate(ctx, out, &dummy, out, olen)) in kek_wrap_key() 269 *outlen = olen; in kek_wrap_key()
|