YOu should always look at the errors generated by popping
up the error stack like this:

#include "/usr/local/ssl/include/err.h"

if (some_OpenSSL_function_returned_unexpected_results) {
  printf("OpenSSL_function failed\n");
  while ((ERR_no = ERR_get_error()))
    printf("%s\n", ERR_error_string(ERR_no, NULL));
  return(-1);
}

To answer your question it would be interesting which
padding method (last parameter of the encrypt function)
do you use and how long your RSA modulus is.

�ֿ�� schrieb:
> 
> Can RSA_public_encrypt() encrypt only 20-bytes long "from"?
> 
> When I pass less than 20bytes string to it, it works well,
> But, if I pass more than 20bytes string, it returns -1.
> 
> And one more thing,
> for less than 20byte-long input, it returns 32 always.
> Is it right?
> 
> I am working on Linux box.
> 
> TIA,
> Foombar.
> ==================================================
> ��� ���� ���� E-mail �ּ� �Ѹ��ϳ�
> http://www.hanmail.net
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]

-- 
Holger Reif                  Tel.: +49 361 74707-0
SmartRing GmbH               Fax.: +49 361 7470720
Europaplatz 5             [EMAIL PROTECTED]
D-99091 Erfurt                    WWW.SmartRing.de
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to