孙 金龙 wrote: > when i watch the > EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len) > { > int ok=0; > EC_KEY *ret=NULL; > EC_PRIVATEKEY *priv_key=NULL; > > if ((priv_key = EC_PRIVATEKEY_new()) == NULL) > { > ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_MALLOC_FAILURE); > return NULL; > } > > if ((priv_key = d2i_EC_PRIVATEKEY(&priv_key, in, len)) == NULL) > { > ECerr(EC_F_D2I_ECPRIVATEKEY, ERR_R_EC_LIB); > EC_PRIVATEKEY_free(priv_key); > return NULL; > } > .............................. > i have searched all the code of the openssl,but i can't find > EC_PRIVATEKEY_new()) and d2i_EC_PRIVATEKEY(),where are they? thanks
both functions are defined via the IMPLEMENT_ASN1_ALLOCFUNCTIONS macro Cheers, Nils ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]