/net-tools-3.6.0/mbedtls-2.4.0/library/ |
D | pk_wrap.c | 71 static int rsa_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, in rsa_verify_wrap() argument 81 MBEDTLS_RSA_PUBLIC, md_alg, in rsa_verify_wrap() 91 static int rsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, in rsa_sign_wrap() argument 99 md_alg, (unsigned int) hash_len, hash, sig ) ); in rsa_sign_wrap() 197 static int ecdsa_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, 201 static int ecdsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, 206 static int eckey_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, in eckey_verify_wrap() argument 216 ret = ecdsa_verify_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len ); in eckey_verify_wrap() 223 static int eckey_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, in eckey_sign_wrap() argument 234 ret = ecdsa_sign_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len, in eckey_sign_wrap() [all …]
|
D | pk.c | 160 static inline int pk_hashlen_helper( mbedtls_md_type_t md_alg, size_t *hash_len ) in pk_hashlen_helper() argument 167 if( ( md_info = mbedtls_md_info_from_type( md_alg ) ) == NULL ) in pk_hashlen_helper() 177 int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, in mbedtls_pk_verify() argument 182 pk_hashlen_helper( md_alg, &hash_len ) != 0 ) in mbedtls_pk_verify() 188 return( ctx->pk_info->verify_func( ctx->pk_ctx, md_alg, hash, hash_len, in mbedtls_pk_verify() 196 mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, in mbedtls_pk_verify_ext() argument 222 md_alg, (unsigned int) hash_len, hash, in mbedtls_pk_verify_ext() 242 return( mbedtls_pk_verify( ctx, md_alg, hash, hash_len, sig, sig_len ) ); in mbedtls_pk_verify_ext() 248 int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, in mbedtls_pk_sign() argument 254 pk_hashlen_helper( md_alg, &hash_len ) != 0 ) in mbedtls_pk_sign() [all …]
|
D | pkcs11.c | 169 mbedtls_md_type_t md_alg, in mbedtls_pkcs11_sign() argument 184 if( md_alg != MBEDTLS_MD_NONE ) in mbedtls_pkcs11_sign() 186 const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); in mbedtls_pkcs11_sign() 190 if( mbedtls_oid_get_oid_by_md( md_alg, &oid, &oid_size ) != 0 ) in mbedtls_pkcs11_sign() 204 if( md_alg != MBEDTLS_MD_NONE ) in mbedtls_pkcs11_sign()
|
D | x509write_csr.c | 64 void mbedtls_x509write_csr_set_md_alg( mbedtls_x509write_csr *ctx, mbedtls_md_type_t md_alg ) in mbedtls_x509write_csr_set_md_alg() argument 66 ctx->md_alg = md_alg; in mbedtls_x509write_csr_set_md_alg() 195 mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash ); in mbedtls_x509write_csr_der() 201 if( ( ret = mbedtls_pk_sign( ctx->key, ctx->md_alg, hash, 0, sig, &sig_len, in mbedtls_x509write_csr_der() 203 ( ret = mbedtls_oid_get_oid_by_sig_alg( pk_alg, ctx->md_alg, in mbedtls_x509write_csr_der()
|
D | oid.c | 311 mbedtls_md_type_t md_alg; member 411 FN_OID_GET_ATTR2(mbedtls_oid_get_sig_alg, oid_sig_alg_t, sig_alg, mbedtls_md_type_t, md_alg, mbedtl… 412 …t_oid_by_sig_alg, oid_sig_alg_t, oid_sig_alg, mbedtls_pk_type_t, pk_alg, mbedtls_md_type_t, md_alg) 570 mbedtls_md_type_t md_alg; member 625 FN_OID_TYPED_FROM_ASN1(oid_md_alg_t, md_alg, oid_md_alg) 626 FN_OID_GET_ATTR1(mbedtls_oid_get_md_alg, oid_md_alg_t, md_alg, mbedtls_md_type_t, md_alg) 627 …ID_GET_OID_BY_ATTR1(mbedtls_oid_get_oid_by_md, oid_md_alg_t, oid_md_alg, mbedtls_md_type_t, md_alg) 636 mbedtls_md_type_t md_alg; member 657 …pkcs12_pbe_alg, oid_pkcs12_pbe_alg_t, pkcs12_pbe_alg, mbedtls_md_type_t, md_alg, mbedtls_cipher_ty… in FN_OID_TYPED_FROM_ASN1()
|
D | rsa.c | 925 mbedtls_md_type_t md_alg, in mbedtls_rsa_rsassa_pss_sign() argument 947 if( md_alg != MBEDTLS_MD_NONE ) in mbedtls_rsa_rsassa_pss_sign() 950 md_info = mbedtls_md_info_from_type( md_alg ); in mbedtls_rsa_rsassa_pss_sign() 1026 mbedtls_md_type_t md_alg, in mbedtls_rsa_rsassa_pkcs1_v15_sign() argument 1046 if( md_alg != MBEDTLS_MD_NONE ) in mbedtls_rsa_rsassa_pkcs1_v15_sign() 1048 const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); in mbedtls_rsa_rsassa_pkcs1_v15_sign() 1052 if( mbedtls_oid_get_oid_by_md( md_alg, &oid, &oid_size ) != 0 ) in mbedtls_rsa_rsassa_pkcs1_v15_sign() 1071 if( md_alg == MBEDTLS_MD_NONE ) in mbedtls_rsa_rsassa_pkcs1_v15_sign() 1150 mbedtls_md_type_t md_alg, in mbedtls_rsa_pkcs1_sign() argument 1159 return mbedtls_rsa_rsassa_pkcs1_v15_sign( ctx, f_rng, p_rng, mode, md_alg, in mbedtls_rsa_pkcs1_sign() [all …]
|
D | ecdsa.c | 163 mbedtls_md_type_t md_alg ) in mbedtls_ecdsa_sign_det() argument 172 if( ( md_info = mbedtls_md_info_from_type( md_alg ) ) == NULL ) in mbedtls_ecdsa_sign_det() 308 int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t md_alg, in mbedtls_ecdsa_write_signature() argument 325 hash, hlen, md_alg ) ); in mbedtls_ecdsa_write_signature() 327 (void) md_alg; in mbedtls_ecdsa_write_signature() 347 mbedtls_md_type_t md_alg ) in mbedtls_ecdsa_write_signature_det() argument 349 return( mbedtls_ecdsa_write_signature( ctx, md_alg, hash, hlen, sig, slen, in mbedtls_ecdsa_write_signature_det()
|
D | x509.c | 154 static int x509_get_hash_alg( const mbedtls_x509_buf *alg, mbedtls_md_type_t *md_alg ) in x509_get_hash_alg() argument 184 if( ( ret = mbedtls_oid_get_md_alg( &md_oid, md_alg ) ) != 0 ) in x509_get_hash_alg() 214 mbedtls_md_type_t *md_alg, mbedtls_md_type_t *mgf_md, in mbedtls_x509_get_rsassa_pss_params() argument 224 *md_alg = MBEDTLS_MD_SHA1; in mbedtls_x509_get_rsassa_pss_params() 251 if( ( ret = mbedtls_oid_get_md_alg( &alg_id, md_alg ) ) != 0 ) in mbedtls_x509_get_rsassa_pss_params() 618 mbedtls_md_type_t *md_alg, mbedtls_pk_type_t *pk_alg, in mbedtls_x509_get_sig_alg() argument 626 if( ( ret = mbedtls_oid_get_sig_alg( sig_oid, md_alg, pk_alg ) ) != 0 ) in mbedtls_x509_get_sig_alg() 639 md_alg, in mbedtls_x509_get_sig_alg() 804 mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, in mbedtls_x509_sig_alg_gets() argument 827 md_info = mbedtls_md_info_from_type( md_alg ); in mbedtls_x509_sig_alg_gets() [all …]
|
D | x509write_crt.c | 76 void mbedtls_x509write_crt_set_md_alg( mbedtls_x509write_cert *ctx, mbedtls_md_type_t md_alg ) in mbedtls_x509write_crt_set_md_alg() argument 78 ctx->md_alg = md_alg; in mbedtls_x509write_crt_set_md_alg() 320 if( ( ret = mbedtls_oid_get_oid_by_sig_alg( pk_alg, ctx->md_alg, in mbedtls_x509write_crt_der() 401 mbedtls_md( mbedtls_md_info_from_type( ctx->md_alg ), c, len, hash ); in mbedtls_x509write_crt_der() 403 if( ( ret = mbedtls_pk_sign( ctx->issuer_key, ctx->md_alg, hash, 0, sig, &sig_len, in mbedtls_x509write_crt_der()
|
D | ssl_cli.c | 2095 mbedtls_md_type_t *md_alg, argument 2099 *md_alg = MBEDTLS_MD_NONE; 2114 if( ( *md_alg = mbedtls_ssl_md_alg_from_hash( (*p)[0] ) ) == MBEDTLS_MD_NONE ) 2134 if( mbedtls_ssl_check_sig_hash( ssl, *md_alg ) != 0 ) 2344 mbedtls_md_type_t md_alg = MBEDTLS_MD_NONE; local 2356 &md_alg, &pk_alg ) != 0 ) 2377 if( pk_alg == MBEDTLS_PK_ECDSA && md_alg == MBEDTLS_MD_NONE ) 2378 md_alg = MBEDTLS_MD_SHA1; 2406 if( md_alg == MBEDTLS_MD_NONE ) 2447 if( md_alg != MBEDTLS_MD_NONE ) [all …]
|
D | ssl_srv.c | 2864 mbedtls_md_type_t md_alg = MBEDTLS_MD_NONE; local 2872 md_alg = mbedtls_ssl_md_alg_from_hash( ssl->handshake->sig_alg ); 2874 if( md_alg == MBEDTLS_MD_NONE ) 2887 md_alg = MBEDTLS_MD_SHA1; 2892 md_alg = MBEDTLS_MD_NONE; 2900 if( md_alg == MBEDTLS_MD_NONE ) 2941 if( md_alg != MBEDTLS_MD_NONE ) 2944 const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); 2979 (unsigned int) ( mbedtls_md_get_size( mbedtls_md_info_from_type( md_alg ) ) ) ); 3000 if( ( ret = mbedtls_pk_sign( mbedtls_ssl_own_key( ssl ), md_alg, hash, hashlen, [all …]
|
D | pkparse.c | 949 mbedtls_md_type_t md_alg; in pk_parse_key_pkcs8_encrypted_der() local 995 if( mbedtls_oid_get_pkcs12_pbe_alg( &pbe_alg_oid, &md_alg, &cipher_alg ) == 0 ) in pk_parse_key_pkcs8_encrypted_der() 998 cipher_alg, md_alg, in pk_parse_key_pkcs8_encrypted_der()
|
D | x509_crt.c | 150 mbedtls_md_type_t md_alg ) in x509_profile_check_md_alg() argument 152 if( ( profile->allowed_mds & MBEDTLS_X509_ID_FLAG( md_alg ) ) != 0 ) in x509_profile_check_md_alg()
|
/net-tools-3.6.0/mbedtls-2.4.0/include/mbedtls/ |
D | rsa.h | 428 mbedtls_md_type_t md_alg, 455 mbedtls_md_type_t md_alg, 488 mbedtls_md_type_t md_alg, 520 mbedtls_md_type_t md_alg, 547 mbedtls_md_type_t md_alg, 581 mbedtls_md_type_t md_alg, 614 mbedtls_md_type_t md_alg,
|
D | pkcs11.h | 135 mbedtls_md_type_t md_alg, 153 int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, in mbedtls_ssl_pkcs11_sign() argument 158 return mbedtls_pkcs11_sign( (mbedtls_pkcs11_context *) ctx, mode, md_alg, in mbedtls_ssl_pkcs11_sign()
|
D | ecdsa.h | 97 mbedtls_md_type_t md_alg ); 143 int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t md_alg, 182 mbedtls_md_type_t md_alg ) MBEDTLS_DEPRECATED;
|
D | oid.h | 482 mbedtls_md_type_t *md_alg, mbedtls_pk_type_t *pk_alg ); 504 int mbedtls_oid_get_oid_by_sig_alg( mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg, 515 int mbedtls_oid_get_md_alg( const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg ); 537 int mbedtls_oid_get_oid_by_md( mbedtls_md_type_t md_alg, const char **oid, size_t *olen ); 562 int mbedtls_oid_get_pkcs12_pbe_alg( const mbedtls_asn1_buf *oid, mbedtls_md_type_t *md_alg,
|
D | pk.h | 167 int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, 283 int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, 317 mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, 345 int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg,
|
D | pk_internal.h | 50 int (*verify_func)( void *ctx, mbedtls_md_type_t md_alg, 55 int (*sign_func)( void *ctx, mbedtls_md_type_t md_alg,
|
D | x509.h | 289 mbedtls_md_type_t *md_alg, mbedtls_md_type_t *mgf_md, 294 mbedtls_md_type_t *md_alg, mbedtls_pk_type_t *pk_alg, 303 mbedtls_pk_type_t pk_alg, mbedtls_md_type_t md_alg,
|
D | x509_csr.h | 77 mbedtls_md_type_t md_alg; member 197 void mbedtls_x509write_csr_set_md_alg( mbedtls_x509write_csr *ctx, mbedtls_md_type_t md_alg );
|
D | x509_crt.h | 138 mbedtls_md_type_t md_alg; member 514 void mbedtls_x509write_crt_set_md_alg( mbedtls_x509write_cert *ctx, mbedtls_md_type_t md_alg );
|
/net-tools-3.6.0/mbedtls-2.4.0/tests/suites/ |
D | test_suite_hmac_drbg.function | 32 void hmac_drbg_entropy_usage( int md_alg ) 48 md_info = mbedtls_md_info_from_type( md_alg ); 112 void hmac_drbg_seed_file( int md_alg, char *path, int ret ) 119 md_info = mbedtls_md_info_from_type( md_alg ); 134 void hmac_drbg_buf( int md_alg ) 146 md_info = mbedtls_md_info_from_type( md_alg ); 163 void hmac_drbg_no_reseed( int md_alg, 190 md_info = mbedtls_md_info_from_type( md_alg ); 223 void hmac_drbg_nopr( int md_alg, 251 md_info = mbedtls_md_info_from_type( md_alg ); [all …]
|
D | test_suite_ecdsa.function | 99 void ecdsa_det_test_vectors( int id, char *d_str, int md_alg, 118 md_info = mbedtls_md_info_from_type( md_alg ); 123 TEST_ASSERT( mbedtls_ecdsa_sign_det( &grp, &r, &s, &d, hash, hlen, md_alg ) == 0 );
|
D | test_suite_pk.function | 48 int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, 52 md_alg, hashlen, hash, sig ) );
|