Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Error adding attribute" encountered when creating certificate

When i create an OpenSSL certificate, i am asked to enter the additional attributes such as country code, state or province name, organization, organization unit name and common name. After entering all these i am asked to enter the common name and email address. i have entered. i have entered it as below

Country Name (2 letter code) [AU]:in
State or Province Name (full name) [Some-State]:tamilnadu
Locality Name (eg, city) []:coimbatore
Organization Name (eg, company) [Internet Widgits Pty Ltd]:abc
Organizational Unit Name (eg, section) []:abcd
Common Name (eg, YOUR name) []:xxxx

After this i am asked to enter the password, i have also entered it. it is shown below:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:123ytrewq

After finishing above steps if i press enter to generate the certificate, the following error occurs.

 Error adding attribute
7532:error:0D0BA041:asn1 encoding routines:ASN1_STRING_set:malloc failure:./cryp
to/asn1/asn1_lib.c:381:
7532:error:0B08A041:x509 certificate routines:X509_ATTRIBUTE_set1_data:malloc fa
ilure:./crypto/x509/x509_att.c:317:
problems making Certificate Request

Can anyone help me? thanks in advance

like image 313
user1570577 Avatar asked Mar 04 '14 06:03

user1570577


1 Answers

This is an issue related with OpenSSL 0.9.8h. Using higher versions like v1.1.0f solves the problem.

like image 81
hkutluay Avatar answered Oct 12 '22 15:10

hkutluay