#include <stdio.h>
#include "cryptlib.h"
-#include "dsa.h"
-#include "asn1.h"
-#include "asn1_mac.h"
+#include <openssl/dsa.h>
+#include <openssl/asn1.h>
+#include <openssl/asn1_mac.h>
DSA_SIG *DSA_SIG_new(void)
{
return(ret);
}
-void DSA_SIG_free(r)
-DSA_SIG *r;
+void DSA_SIG_free(DSA_SIG *r)
{
if (r == NULL) return;
if (r->r) BN_clear_free(r->r);
Free(r);
}
-int i2d_DSA_SIG(v,pp)
-DSA_SIG *v;
-unsigned char **pp;
+int i2d_DSA_SIG(DSA_SIG *v, unsigned char **pp)
{
int t=0,len;
ASN1_INTEGER rbs,sbs;
return(t);
}
-DSA_SIG *d2i_DSA_SIG(a,pp,length)
-DSA_SIG **a;
-unsigned char **pp;
-long length;
+DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, unsigned char **pp, long length)
{
int i=ERR_R_NESTED_ASN1_ERROR;
ASN1_INTEGER *bs=NULL;
M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
if ((ret->s=BN_bin2bn(bs->data,bs->length,ret->s)) == NULL)
goto err_bn;
- ASN1_BIT_STRING_free(bs);
+ M_ASN1_BIT_STRING_free(bs);
M_ASN1_D2I_Finish_2(a);
err_bn:
err:
DSAerr(DSA_F_D2I_DSA_SIG,i);
if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_SIG_free(ret);
- if (bs != NULL) ASN1_BIT_STRING_free(bs);
+ if (bs != NULL) M_ASN1_BIT_STRING_free(bs);
return(NULL);
}