You should just be able to create an ECDSA_SIG structure using:

ECDSA_SIG *mysig;

if(!(mysig = ECDSA_SIG_new())) goto err;

And then simply copy your r and s values directly into the ECDSA_SIG
structure (assuming they are BIGNUMs):

if(!BN_copy(mysig->r, r)) goto err;
if(!BN_copy(mysig->s, s)) goto err;

Finally you should be able to call ECDSA_do_verify.

Matt



On 21 December 2012 09:26, jeetendra gangele <gangele...@gmail.com> wrote:

> Hi all,
>
> I am having a raw data(signature to verify the signed data).
> I used ECDSA_verify function and its failing because by ram signature
> not having encoding details.
> I removed these details while signing the data I copied r and s buffer
> of ECDSA_SIG structure into the buffer and then that buffer I am using
> as verification.
> Its failing .
> When I used the d2i_ECDSA_SIG to ram unsiged char * to ECDSA_SIG
> object that also failing.
> anyway internall ECDSA_verify is callling the ECDSA_do_verify.
> Can any body guide me given the raw data signature or two BIGNUM(r and
> s of ECDSA_SIG object) can I create the Actaul signature object which
> can be used ofr verification?
>
>
>
> Thanks
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-users@openssl.org
> Automated List Manager                           majord...@openssl.org
>

Reply via email to