Showing posts with label openssl error. Show all posts
Showing posts with label openssl error. Show all posts

Monday, March 10, 2014

RSA operation error
5747:error:0406D06E:rsa routines:RSA_padding_add_PKCS1_type_2:data too large for key size:rsa_pk1.c:151:
Basically RSA is not aimed to encrypt large data file, so you will get this error when you try to encrypt a file such as length(file) > length(RSA key).
I suggest to calculate first hash version of the file using MD5 or SHA-1 then encrypt it using the key.

Note: in real cryptographic system, RSA public/private key are only used to exchange symmetric key.

Tuesday, March 4, 2014

You probably face this error while using OpenSSL
WARNING  can't open config file
Unable to load config info from
That's mean, openssl can't find configuration file - generally known us openssl.cnf - so you have to set the envirement variable OPENSSL_CONF to the configuration file path, for example:

#export OPENSSL_CONF=/etc/ssl/openssl.cnf

That's all folks !

Monday, March 3, 2014

If you get the following error while issuing a digital certificate using OpenSSL library under PHP
error:0D11A086:asn1 encoding routines:ASN1_mbstring_copy:string too short
you probably set an empty string in Distinguished Name (dn) array, it you want to let it empty just give it " " (space) value.

Tuesday, February 25, 2014

This error is frequently appeared when we try to sign a certificate using openssl, the procedure to resolve this error is:

Create the index.txt file.
# touch /etc/pki/CA/index.txt

Create a serial file to label the CA and all subsequent certificates.
# echo '1000' > /etc/pki/CA/serial

NB: You have to do this just the first time you set-up the SSL certificate.