Nils Larsch wrote:
> 
> Ken Murchison wrote:
> > What is the correct way to convert a DSA key struct into a u_char buffer
> > for use with EVP_VerifyFinal()?  Is there a generic way to do this
> > regardless of the signature key algorithm?  The value of the EVP
> > interface seems lost if I have to call different key preparation
> > functions depending on algorithm used for the signature.
> 
> EVP_VerifyFinal() expects the public key in a EVP_PKEY structure,
> so why do you want to convert the key into a unsigned char buffer ?
> Perhaps I misunderstood you, so what do you have and what do you
> want to have ?

Sorry, I misspoke.  EVP_VerifyFinal() expects the _signature_ as a
u_char buffer.  How do I convert a DSA_SIG structure into a u_char
buffer?  For RSA sigs, I just convert the signature value using
BN_bn2bin() (with padding if the length of the sig value < length of
modulus).

This is the part that bothers me.  AFAICT the EVP signature API doesn't
abstract the algorithm specific handling of the signature.  Is this by
design, an oversight, or am I missing something?

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to