How to check ssl certificate expiry date using openssl command?


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers How to check ssl certificate expiry date using openssl command?
# 1  
Old 06-13-2019
How to check ssl certificate expiry date using openssl command?

hi

how to check ssl certificate expiry date using openssl command
try below code it is not working, any help


Code:
echo q | openssl s_client -connect akamai.com:443 | openssl x509 -noout -enddate
socket: Bad file descriptor
connect:errno=9
unable to load certificate
140587484587920:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: TRUSTED CERTIFICATE

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

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

3. Cybersecurity

openssl fails to download certificate

I tried openssl to download a remote cert on my181.svr.us.cyber.net Below are the 3 steps to generate self sign certificate. 1)To generate keys: /opt/boksm/lib/openssl genrsa -des3 -out server2.key 2048 -config /usr/sfw/lib/webmin/acl/openssl.cnf 2)To generate CSR ... (0 Replies)
Discussion started by: mohtashims
0 Replies

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

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

6. Shell Programming and Scripting

Password expiry date check for hp servers

Hi All, Can anybody help me, to find the command to check for the password expiry date for the hp servers. Thanks, Deepak (3 Replies)
Discussion started by: dswain
3 Replies

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

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

9. UNIX for Advanced & Expert Users

Digital Certificate Expiry Date

HI, I want to know the certificate expiry dates and who is owner of the certificate installed in UNIX. example certiface name 1)SSL 2)Veri Sign Trust Network (1 Reply)
Discussion started by: RG18173
1 Replies

10. HP-UX

Certificate Expiry Dates

Hi, we are having the installed cerificates in our unix server's. The certificates are in following format : cacert.pem,cert8.db,ois294.sem,CertGenCAKey.der,ss_keystore.jks So i want to know the Expiry date for these certificates. how to get the valid FROM to TO dates for these kind of... (1 Reply)
Discussion started by: srujana
1 Replies
Login or Register to Ask a Question
SSL_get_peer_certificate(3SSL)					      OpenSSL					    SSL_get_peer_certificate(3SSL)

NAME
SSL_get_peer_certificate - get the X509 certificate of the peer SYNOPSIS
#include <openssl/ssl.h> X509 *SSL_get_peer_certificate(const SSL *ssl); DESCRIPTION
SSL_get_peer_certificate() returns a pointer to the X509 certificate the peer presented. If the peer did not present a certificate, NULL is returned. NOTES
Due to the protocol definition, a TLS/SSL server will always send a certificate, if present. A client will only send a certificate when explicitly requested to do so by the server (see SSL_CTX_set_verify(3)). If an anonymous cipher is used, no certificates are sent. That a certificate is returned does not indicate information about the verification state, use SSL_get_verify_result(3) to check the verification state. The reference count of the X509 object is incremented by one, so that it will not be destroyed when the session containing the peer certificate is freed. The X509 object must be explicitly freed using X509_free(). RETURN VALUES
The following return values can occur: NULL No certificate was presented by the peer or no connection was established. Pointer to an X509 certificate The return value points to the certificate presented by the peer. SEE ALSO
ssl(3), SSL_get_verify_result(3), SSL_CTX_set_verify(3) 1.0.1e 2013-02-11 SSL_get_peer_certificate(3SSL)