X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fasn1%2Fd2i_dsap.c;h=6d1c2971330d2cddfe0c4febabf9baf0e01d605b;hp=fc2961b3a419243f6abee374964c44f9ed8be782;hb=b05c7211cb4e189ac1717cb37e208f19ae434368;hpb=dfeab0689f69c0b4bd3480ffd37a9cacc2f17d9c diff --git a/crypto/asn1/d2i_dsap.c b/crypto/asn1/d2i_dsap.c index fc2961b3a4..6d1c297133 100644 --- a/crypto/asn1/d2i_dsap.c +++ b/crypto/asn1/d2i_dsap.c @@ -56,22 +56,19 @@ * [including the GNU Public Licence.] */ +#ifndef NO_DSA #include #include "cryptlib.h" -#include "bn.h" -#include "dsa.h" -#include "objects.h" -#include "asn1_mac.h" +#include +#include +#include +#include -/* - * ASN1err(ASN1_F_D2I_DSAPARAMS,ERR_R_ASN1_LENGTH_MISMATCH); - * ASN1err(ASN1_F_I2D_DSAPARAMS,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); - */ +#ifdef NEG_PUBKEY_BUG +#define d2i_ASN1_INTEGER d2i_ASN1_UINTEGER +#endif -DSA *d2i_DSAparams(a,pp,length) -DSA **a; -unsigned char **pp; -long length; +DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length) { int i=ERR_R_NESTED_ASN1_ERROR; ASN1_INTEGER *bs=NULL; @@ -86,7 +83,7 @@ long length; M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; - ASN1_BIT_STRING_free(bs); + M_ASN1_BIT_STRING_free(bs); M_ASN1_D2I_Finish_2(a); @@ -95,7 +92,7 @@ err_bn: err: ASN1err(ASN1_F_D2I_DSAPARAMS,i); if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); - if (bs != NULL) ASN1_BIT_STRING_free(bs); + if (bs != NULL) M_ASN1_BIT_STRING_free(bs); return(NULL); } - +#endif