Sponsored Content
Top Forums Programming Extract Common Name (CN) of SSL certificate using perl code Post 302837901 by jhamaks on Saturday 27th of July 2013 12:20:22 PM
Old 07-27-2013
Thank you achenle Smilie

i had to install this module and other dependent modules to make it work.
I'm using rather openssl command in my perl code to get the ssl certificate "subject" to get the CN.

Code:
openssl x509 -in QA.channelnet.us.cer -noout -subject

But now i need the perl code which can extract the individual ssl certs from one single file. The single file looks same as posted earlier.

Code:
--------------------BEGIN CERTIFICATE------------------
MIID2TCCAsGgAwIBAgIDAjbQMA0GCSqGSIb3DQEBBQUAME
4NwdzxoQ2KDLX4z6DOW/cf/lXUQdpj6HR/oaToODEj+IZpWYeZqF
                             :                             
                             :
6wJHzSXj8gYETpnKXKBuervdo5AaRTPvvz7SBMS24CqFZUE+ENQ=
--------------------END CERTIFICATE-----------------------
--------------------BEGIN CERTIFICATE----------------------
MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAME
IxCzAJBgNVBAYTAlVTAq45pmp0sdhsdkslswqpywmcperewe
                           :                             
                           :                              
hw4EbNX/3aBd7YdStysV6drE57xNNB6pXE0zX5IJL4hmXXeXx
x12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3=
--------------------END CERTIFICATE-----------------------

I want to extract the individual certs from above file and store it on the disk with some name(may be appending timestamp to some pre-determined file name).

Last edited by jhamaks; 07-27-2013 at 01:24 PM.. Reason: data display not proper
 

9 More Discussions You Might Find Interesting

1. Web Development

SSL Certificate Installation problem

Hello everybody Hope somebody can help me I'm trying to install SSL Certificate on Apache/mod_ssl on Linux with Zend for Oracle. I bought and downloaded certificate from certificate from Network Solutions. Than I followed the instructions to the dot. I created a directory for certificate... (2 Replies)
Discussion started by: Trusevich
2 Replies

2. Web Development

SSL certificate

Dear All Anyone know how to issue two different certification on apache virtualhost fyi i have one virtualhost eg 69.192.1.25:443 already signed with verisign how can i configure another virtualhost 69.192.1.25:443 which signing with another certificate which self signing. i search net not... (1 Reply)
Discussion started by: netxus
1 Replies

3. AIX

Installing SSL certificate on AIX

Hello, I am new in UNIX, and some one asks me to install SSL certificates to allow exchange with an external system. Can someone tell how to install certificate (ex : verisignxxx.cer) on a UNIX server? Many thanks. Tibo (4 Replies)
Discussion started by: tibo51
4 Replies

4. Cybersecurity

SSL certificate

Hi guys. I have some questions about ssl certificates. I looked at SSL providers and saw that they are providing 2 types of certificates: per server or per domain. my server host name is: srv1.example.com I have a smtp, imap, web server on this box. but all services accessed by different... (1 Reply)
Discussion started by: majid.merkava
1 Replies

5. Web Development

export SSL certificate

we are doing TCP for our systems. I have a working SSL certificate on prodction webserver. Im planning to export it to our DR server for TCP purposes. However when I export based on the procedure below, it doesn't work. When I restart the DR webserver, it still says the certifcate is expired.Any... (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. Red Hat

SSL Certificate Renewal on Tomcat

Hi, I want to renew the ssl certificate for one of my application on tomcat without down time. I want to know what would the possible impacts for the users who currently have sessions to the app. Regards, Arumon (1 Reply)
Discussion started by: arumon
1 Replies

7. Programming

Perl to extract ssl certs from xml file

HI Guys, I'm a newbie in perl. (4 Replies)
Discussion started by: jhamaks
4 Replies

8. Cybersecurity

SSL Certificate Stores

Hey everyone, I'm trying to get a lay of the land for OS and Application Certificate Stores. Can someone confirm that I have this concept right? If the application you're using say Firefox has it's own trusted CA store, it uses that exclusively. So if you're running firefox in Windows, Firefox... (4 Replies)
Discussion started by: Lost in Cyberia
4 Replies

9. Web Development

CronJobs issues after SSL certificate

Hello! I had a cron job running on my website, activating a php script every friday. The Php script just activated another photo to add in the gallery. It worked fine until I got an SSL certificate for my website, then everything broke. This was the command before: lynx -source... (0 Replies)
Discussion started by: AGDesign
0 Replies
NSEQ(1SSL)							      OpenSSL								NSEQ(1SSL)

NAME
nseq - create or examine a netscape certificate sequence SYNOPSIS
openssl nseq [-in filename] [-out filename] [-toseq] DESCRIPTION
The nseq command takes a file containing a Netscape certificate sequence and prints out the certificates contained in it or takes a file of certificates and converts it into a Netscape certificate sequence. COMMAND OPTIONS
-in filename This specifies the input filename to read or standard input if this option is not specified. -out filename specifies the output filename or standard output by default. -toseq normally a Netscape certificate sequence will be input and the output is the certificates contained in it. With the -toseq option the situation is reversed: a Netscape certificate sequence is created from a file of certificates. EXAMPLES
Output the certificates in a Netscape certificate sequence openssl nseq -in nseq.pem -out certs.pem Create a Netscape certificate sequence openssl nseq -in certs.pem -toseq -out nseq.pem NOTES
The PEM encoded form uses the same headers and footers as a certificate: -----BEGIN CERTIFICATE----- -----END CERTIFICATE----- A Netscape certificate sequence is a Netscape specific form that can be sent to browsers as an alternative to the standard PKCS#7 format when several certificates are sent to the browser: for example during certificate enrollment. It is used by Netscape certificate server for example. BUGS
This program needs a few more options: like allowing DER or PEM input and output files and allowing multiple certificate files to be used. 1.0.1e 2013-02-11 NSEQ(1SSL)
All times are GMT -4. The time now is 08:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy