Expand Up@@ -178,8 +178,7 @@ static int tls1_prf_P_hash(const EVP_MD *md, unsignedchar*out,size_tolen) { intchunk; EVP_MD_CTX*ctx=NULL,*ctx_tmp=NULL,*ctx_init=NULL; EVP_PKEY*mac_key=NULL; EVP_MAC_CTX*ctx=NULL,*ctx_tmp=NULL,*ctx_init=NULL; ...
Under low memory a crash was observed with openssl-1.0.2j: I think the reason is that pmeth->init fails in int_ctx_new or pmeth->copy fails in EVP_PKEY_CTX_dup due to OOM, calling pmeth->cleanup can crash. As a workaround set pmeth to ze...
idp.id_offset = id->id_offset;if(ikev2_print_id(&idp, idstr,sizeof(idstr)) ==-1)gotodone;if(len ==0) {/* Data is already an public key */peerkey = (EVP_PKEY *)data; }else{if((rawcert = BIO_new_mem_buf(data, len)) ==NULL)gotodone;if((peerrsa = d2i_RSAPublicKey_...
}else{size_ts = EVP_MD_size(ctx->digest);returnEVP_PKEY_sign(ctx->pctx, out_sig, out_sig_len,NULL, s); } } } 开发者ID:randombit,项目名称:hacrypto,代码行数:33,代码来源:digestsign.c 示例12: tls1_cert_verify_mac ▲点赞 1▼ inttls1_cert_verify_mac(SSL *s,intmd_nid,unsigned...
static int test_kdf_tls1_prf(void) { int ret = 0; EVP_PKEY_CTX *pctx; unsigned char out[16]; size_t outlen = sizeof(out); if ((pctx = EVP_PKEY_CTX_new_id(EVP_PKEY_TLS1_PRF, NULL)) == NULL) { TEST_error("EVP_PKEY_TLS1_PRF"); goto err; } if (EVP_PKEY_derive_in...
extern const EVP_KDF tls1_prf_kdf_meth; extern const EVP_KDF hkdf_kdf_meth; extern const EVP_KDF sshkdf_kdf_meth; extern const EVP_KDF ss_kdf_meth; struct evp_md_st { /* nid */ @@ -528,6 +529,7 @@ struct evp_pkey_st { void openssl_add_all_ciphers_int(void); void openss...
The new API is modeled after the current KDF support under the PKEY API in order to minimize the work required to update applications to use the new API. Support is included for PBKDF2, scrypt, TLS1 PRF and HKDF. PBKDF1 and PKCS12 KDF are not implemented. ...
key = pkey1; pki_openssl_error();//CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF);//printf("Encrypt: encKey_len=%d\n", encKey_len);return; } 开发者ID:J-Javan,项目名称:xca,代码行数:86,代码来源:pki_evp.cpp 示例4: pkey_rsa_ctrl
mac_type = s->s3->tmp.new_mac_pkey_type;#ifndefOPENSSL_NO_COMPcomp=s->s3->tmp.new_compression;#endifkey_block=s->s3->tmp.key_block;#ifdefKSSL_DEBUGprintf("tls1_change_cipher_state(which= %d) w/\n", which);printf("\talg= %ld/%ld, comp= %p\n", ...
Handle<std::string> RSA_PKCS1_sign(Handle<ScopedEVP_PKEY> hKey,constEVP_MD *md, Handle<std::string> hData) { LOG_FUNC();ScopedEVP_MD_CTXctx(EVP_MD_CTX_create()); EVP_PKEY_CTX* pctx =nullptr;size_tsiglen =0;if(ctx.isEmpty() || ...