Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

SQL to extract specific attributes from an x509 digital certificate

ltpsNov 15 2012 — edited Nov 20 2012
I am curious whether there is a way to use SQL to extract specific attributes from an x509 digital certificate. I know how to do it using openssl - no problem. But what if the pem file is stored in a datebase column and I want to extract the expiration date. From the openssl command line, I can just do this to extract the certificate's expiration date:

openssl x509 -noout -in certificate.pem -dates | grep notAfter | awk -F= '{print $2}'
(extract just the dates | take only the line with the expiration date | print only the second column in the line delimited by =)

But if certificate.pem is stored in an Oracle database field, how to achieve the same result? Is there anything like "DBMS_OPENSSL"?

I got to thinking about V$WALLET in an Oracle database. The only columns here are CERT_ID, DN, SERIAL_NUM, ISSUER, KEYSIZE, and STATUS - no certificate, which suggests that it is stored elsewhere. As you can tell, I'm new at this.

Thanks for your help!
This post has been answered by odie_63 on Nov 17 2012
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 18 2012
Added on Nov 15 2012
6 comments
3,201 views