Sponsored Content
Full Discussion: Grep from a certificate
Top Forums Shell Programming and Scripting Grep from a certificate Post 302991895 by Loc on Friday 17th of February 2017 04:12:45 PM
Old 02-17-2017
Grep from a certificate

I can view the openSSL certifcate with this command
Code:
openssl x509 -text -in myCertificate.pem

I just wanted to see when the cert will expire only. The line which I want to read is,
Not After : Jul 28 14:09:57 2015 GMT
I tried using the grep command but it doesn't display anything.
Code:
grep "After" myCertificate.pem

Is there a way that I can read only that line of the certificate?? If not with grep then maybe with some other command.
Thanks in advance
 

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

Unix Certificate

TO WHOM IT MAY CONCERN: I am Ayanda Fuzile, I would like to request my UNIX Certificate, I completed my course in 2000. My email adress is removed, my postal adress is also removed. Kind Regards, Ayanda Fuzile (1 Reply)
Discussion started by: afuzile
1 Replies

2. UNIX for Advanced & Expert Users

decryption using digital certificate

A client application is encrypting a text using private key and sends through socket. My application(server written in c/c++,unix) receives the chiper-text through socket. I have client's digital certificate. now, how do I decrypt(may be using openssl library) this ciper-text using client's... (1 Reply)
Discussion started by: johnbach
1 Replies

3. 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

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. Cybersecurity

question about certificate for domain

Hi, I would like to know if certificate for mydomain.com would work as well for www.mydomain.com and for all subdomain of example.com? I ask this because I want to buy a certificate and I was not what domain should I ask the certificate for? (0 Replies)
Discussion started by: programAngel
0 Replies

7. 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

8. Cybersecurity

Another Certificate question

Hey everyone, another question on certificate chains... When a site applies for an ssl certificate, do they have to apply to a root CA? or can they apply to a root, or one of the many smaller CA companies? Then once they obtain a cert from that smaller CA, the company gets it's cert signed by a... (1 Reply)
Discussion started by: Lost in Cyberia
1 Replies

9. HP-UX

Sendmail TLS and Certificate?

We are running HP-UX 11v1 and are about to upgrade sendmail to 8.13.3 to allow support for TLS. Enabling TLS seems pretty straightforward, but I'm wondering if an SSL certificate is required for this. Our MS Exchange server does use a certificate. Do I need to arrange for a public certificate to... (3 Replies)
Discussion started by: jduehmig
3 Replies

10. UNIX for Advanced & Expert Users

Does vsftpd support user access with client certificate with priv/pub key + vsftpd certificate?

:rolleyes:I am trying to setup all certificate based client-server environment in Linux using vsftpd and curl with openssl. I would like to make a user access with vsftpd certificate and user own client certificate (self-signed) with private/public key. I don't see google posts about the my plan... (4 Replies)
Discussion started by: gogogo
4 Replies
CA.PL(1SSL)							      OpenSSL							       CA.PL(1SSL)

NAME
CA.pl - friendlier interface for OpenSSL certificate programs SYNOPSIS
CA.pl [-?] [-h] [-help] [-newcert] [-newreq] [-newreq-nodes] [-newca] [-xsign] [-sign] [-signreq] [-signcert] [-verify] [files] DESCRIPTION
The CA.pl script is a perl script that supplies the relevant command line arguments to the openssl command for some common certificate operations. It is intended to simplify the process of certificate creation and management by the use of some simple options. COMMAND OPTIONS
?, -h, -help prints a usage message. -newcert creates a new self signed certificate. The private key and certificate are written to the file "newreq.pem". -newreq creates a new certificate request. The private key and request are written to the file "newreq.pem". -newreq-nodes is like -newreq except that the private key will not be encrypted. -newca creates a new CA hierarchy for use with the ca program (or the -signcert and -xsign options). The user is prompted to enter the filename of the CA certificates (which should also contain the private key) or by hitting ENTER details of the CA will be prompted for. The relevant files and directories are created in a directory called "demoCA" in the current directory. -pkcs12 create a PKCS#12 file containing the user certificate, private key and CA certificate. It expects the user certificate and private key to be in the file "newcert.pem" and the CA certificate to be in the file demoCA/cacert.pem, it creates a file "newcert.p12". This command can thus be called after the -sign option. The PKCS#12 file can be imported directly into a browser. If there is an additional argument on the command line it will be used as the "friendly name" for the certificate (which is typically displayed in the browser list box), otherwise the name "My Certificate" is used. -sign, -signreq, -xsign calls the ca program to sign a certificate request. It expects the request to be in the file "newreq.pem". The new certificate is written to the file "newcert.pem" except in the case of the -xsign option when it is written to standard output. -signCA this option is the same as the -signreq option except it uses the configuration file section v3_ca and so makes the signed request a valid CA certificate. This is useful when creating intermediate CA from a root CA. -signcert this option is the same as -sign except it expects a self signed certificate to be present in the file "newreq.pem". -verify verifies certificates against the CA certificate for "demoCA". If no certificates are specified on the command line it tries to verify the file "newcert.pem". files one or more optional certificate file names for use with the -verify command. EXAMPLES
Create a CA hierarchy: CA.pl -newca Complete certificate creation example: create a CA, create a request, sign the request and finally create a PKCS#12 file containing it. CA.pl -newca CA.pl -newreq CA.pl -signreq CA.pl -pkcs12 "My Test Certificate" DSA CERTIFICATES
Although the CA.pl creates RSA CAs and requests it is still possible to use it with DSA certificates and requests using the req(1) command directly. The following example shows the steps that would typically be taken. Create some DSA parameters: openssl dsaparam -out dsap.pem 1024 Create a DSA CA certificate and private key: openssl req -x509 -newkey dsa:dsap.pem -keyout cacert.pem -out cacert.pem Create the CA directories and files: CA.pl -newca enter cacert.pem when prompted for the CA file name. Create a DSA certificate request and private key (a different set of parameters can optionally be created first): openssl req -out newreq.pem -newkey dsa:dsap.pem Sign the request: CA.pl -signreq NOTES
Most of the filenames mentioned can be modified by editing the CA.pl script. If the demoCA directory already exists then the -newca command will not overwrite it and will do nothing. This can happen if a previous call using the -newca option terminated abnormally. To get the correct behaviour delete the demoCA directory if it already exists. Under some environments it may not be possible to run the CA.pl script directly (for example Win32) and the default configuration file location may be wrong. In this case the command: perl -S CA.pl can be used and the OPENSSL_CONF environment variable changed to point to the correct path of the configuration file "openssl.cnf". The script is intended as a simple front end for the openssl program for use by a beginner. Its behaviour isn't always what is wanted. For more control over the behaviour of the certificate commands call the openssl command directly. ENVIRONMENT VARIABLES
The variable OPENSSL_CONF if defined allows an alternative configuration file location to be specified, it should contain the full path to the configuration file, not just its directory. SEE ALSO
x509(1), ca(1), req(1), pkcs12(1), config(5) 1.0.0e 2005-05-03 CA.PL(1SSL)
All times are GMT -4. The time now is 05:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy