X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=fips%2Fdsa%2Ffips_dsa_lib.c;h=2e2f192aff3be0b0517b3f8e5c89bf129d1abc65;hp=2545966d2a381005bee342da4afce354297ea457;hb=45fcfcb99fd1f37c5b5cd3b76b99b5f70e7f518a;hpb=2b4b28dc32ce7623f6169b43cd18585174de6b20 diff --git a/fips/dsa/fips_dsa_lib.c b/fips/dsa/fips_dsa_lib.c index 2545966d2a..2e2f192aff 100644 --- a/fips/dsa/fips_dsa_lib.c +++ b/fips/dsa/fips_dsa_lib.c @@ -56,9 +56,12 @@ * */ +#define OPENSSL_FIPSAPI + #include #include #include +#include /* Minimal FIPS versions of FIPS_dsa_new() and FIPS_dsa_free: to * reduce external dependencies. @@ -93,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); + } + } +