I'm calling PEM_read_bio_RSAPrivateKey and PEM_read_bio_DSAPrivateKey
with private keys loaded from files on disk.  I read the file into a
string, put that into a BIO and then call the function.

At the moment, I'm reading the entire key file into memory but, of
course, this isn't very safe.  The user could accidentally specify a
huge file and this would try to read all of it into a string.  What is
the maximum size of the RSA/DSA key files that OpenSSL can read?  I
can just return an error if the file exceeds that.  I've tried to find
a specification for the key files but not had much success.

Many thanks.

Alex Lamaison
--
http://swish.sourceforge.net
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to