X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fasn1%2Fd2i_s_pr.c;h=55d5802d702f220cb97fb225b88fab8093ddb95b;hp=b318b1e3b511ebf7f38ac13ebf35e266b6eb8522;hb=f20ee314772c13445a73cae46dd09c46795b5276;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd;ds=sidebyside diff --git a/crypto/asn1/d2i_s_pr.c b/crypto/asn1/d2i_s_pr.c index b318b1e3b5..55d5802d70 100644 --- a/crypto/asn1/d2i_s_pr.c +++ b/crypto/asn1/d2i_s_pr.c @@ -56,20 +56,15 @@ * [including the GNU Public Licence.] */ -/* Origional version from Steven Schoch */ +/* Original version from Steven Schoch */ +#ifndef NO_DSA #include #include "cryptlib.h" -#include "bn.h" -#include "dsa.h" -#include "objects.h" -#include "asn1_mac.h" - -/* - * ASN1err(ASN1_F_D2I_DSAPRIVATEKEY,ERR_R_ASN1_LENGTH_MISMATCH); - * ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); - * ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_PARSING); - */ +#include +#include +#include +#include DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length) { @@ -96,7 +91,8 @@ DSA *d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length) if ((ret->priv_key=BN_bin2bn(bs->data,bs->length,ret->priv_key)) == NULL) goto err_bn; - ASN1_INTEGER_free(bs); + M_ASN1_INTEGER_free(bs); + bs = NULL; M_ASN1_D2I_Finish_2(a); err_bn: @@ -104,7 +100,7 @@ err_bn: err: ASN1err(ASN1_F_D2I_DSAPRIVATEKEY,i); if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); - if (bs != NULL) ASN1_INTEGER_free(bs); + if (bs != NULL) M_ASN1_INTEGER_free(bs); return(NULL); } - +#endif