Remove dependency of dsa_sign.o and dsa_vrf.o: new functions FIPS_dsa_sig_new

and FIPS_dsa_sig_free, reimplment DSA_SIG_new and DSA_SIG_free from ASN1
library.
This commit is contained in:
Dr. Stephen Henson
2011-02-13 18:45:41 +00:00
parent e47af46cd8
commit e990b4f838
12 changed files with 33 additions and 36 deletions

View File

@@ -96,3 +96,26 @@ void FIPS_dsa_free(DSA *r)
OPENSSL_free(r);
}
DSA_SIG *FIPS_dsa_sig_new(void)
{
DSA_SIG *sig;
sig = OPENSSL_malloc(sizeof(DSA_SIG));
if (!sig)
return NULL;
sig->r = NULL;
sig->s = NULL;
return sig;
}
void FIPS_dsa_sig_free(DSA_SIG *sig)
{
if (sig)
{
if (sig->r)
BN_free(sig->r);
if (sig->s)
BN_free(sig->s);
OPENSSL_free(sig);
}
}