Hi Rizwan,
Have you put your certificate under trusted path (/var/ssl/certs) and generated the link for the hash value as given in the link -https://www.ibm.com/support/pages/ibm-aix-import-ca-certificate ?
I have not seen any issue with verifying self signed certificate.
For example -
1. Created self signed certificate using following commands (In your case, you have imported it) -
openssl genrsa -out private_key.pem 2048openssl req -new -x509 -key private_key.pem -out certificate.pem -days 3650 -sha1 -subj "/C=US/O=KAR/OU=BAN/CN=mayank"# openssl x509 -in certificate.pem -text -noout | egrep "Issuer|Subject"Issuer: C=US, O=KAR, OU=BAN, CN=mayankSubject: C=US, O=KAR, OU=BAN, CN=mayank2. copy certificate.pem to /var/ssl/certs
3. Calculate certificate's hash value -
# openssl x509 -noout -hash -in certificate.pem
9f5cb542
4.
Create a symbolic link for the hash value
ln -s /var/ssl/certs/certificate.pem /var/ssl/certs/9f5cb542.0
5. Run openssl verify command to verify the self signed certificate -
# openssl verify certificate.pem
certificate.pem: OK
For more details regarding "
error 18 at 0 depth lookup:self signed certificate", you can find the details in the official openssl documentation -
https://www.openssl.org/docs/man1.0.2/man1/openssl-verify.html
18 X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: self signed certificate
the passed certificate is self signed and the same certificate cannot be found in the list of trusted certificates.
Let us know if you need any further details.
Thanks
Mayank
------------------------------
Mayank Sharma
------------------------------