Hi everybody,
I try to verify a xml file which was signed with ecdsa-sha1.
I alredy read to SignatureValue from the xmlfile. which is.
724PlFGHTTL1cFlLFU6g6UetcPVBEAN6oNpogAUx3rgELFH86gA+NqvjVf316zek
so this is the base64 encoded version.
But if i call ecdsa_verify, this doesn't work, because d21_ECDSA need an DER
encoded version.
Because of this i tried to use BIO_f_base64();
The result was.
+ data 0x03198598 "ïn.”Q‡M2õpYK.N éGpõA..z Úh€.1Þ¸.,Qüê" const unsigned char *
But still the function d2i_ECDSA failse!
ANY IDEAS? I really don't know anymore what else to do!!!
int ECDSA_verify(int type, const unsigned char *dgst, int dgst_len, const
unsigned char *sigbuf, int sig_len, EC_KEY *eckey)
{
ECDSA_SIG *s = NULL;
int ret=-1;
unsigned char *p;
s = ECDSA_SIG_new();
if (s == NULL) return(ret);
if (d2i_ECDSA_SIG(&s, &sigbuf, sig_len) == NULL) goto err; --> here happens
the error.
ret=ECDSA_do_verify(dgst, dgst_len, s, eckey);
err:
ECDSA_SIG_free(s);
return(ret);
}