On Fri, Sep 19, 2008, Marco Sommella wrote:

> Hi,
> I'm using OpenSSL 0.9.8a 11 Oct 2005 (+ security patches to 2007-10-13) on
> opensolaris 2008.11 b97 and programming in C.
> My question is about the message digest *m used into functions in object.*
> **
> *I have notice a strange *behavior concerning the  length  of this string:
> if too long and/or not a multiple of 8 char i receive this error:
> 
> error:0407006A:lib(4):func(112):reason(106)
> 
> error:0407006A:rsa routines:RSA_padding_check_PKCS1_type_1:block type is not
> 01
> 

m is not a string it is binary data including the message digest value. The
length of that data is the length of the corresponding digest.

If you wish to sign data as opposed to a digest you should use the
EVP_Sign*() functions.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to