Solved

Detecting certificate expired date

Posted on 2008-10-23
10
2,225 Views
Last Modified: 2013-12-17
Hi experts,

I want to create some script/program/utility that it can detect installed certificate expired date.
Does anyone know how to solve this or have some clue how to do it ?

A snippet program in c#, vb.net or vbscript are welcome.

Thanks,

Aryo Handono
0
Comment
Question by:Aryo1
  • 4
  • 2
10 Comments
 
LVL 19

Expert Comment

by:weellio
ID: 22808632
check this out

http://msdn.microsoft.com/en-us/library/e78byta0(VS.80).aspx
Certificate Manager Tool (Certmgr.exe)
0
 

Author Comment

by:Aryo1
ID: 22818333
Thans for quick response..

What I need is some code program/script so I can automate this process with our monitoring system
0
 

Author Comment

by:Aryo1
ID: 22865008
OK,

I try to make the question more simple..
Our exchange server communicate between sites using IPSec (which is need certificate from our CA server). I need to monitor automatically when the certificate will expired and send us the alert.

Because it was happend weeks ago, our certififate expired without anyone notice it and my exchange server refuse to communicate with others.

I;m asking to all experts, does anyone know how do I monitor the certificate expiry date using some automate script or program ?
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:Aryo1
ID: 22865018

Is this what you were looking for?Yes No
Aryo1:
OK,

I try to make the question more simple..
Our exchange server communicate between sites using IPSec (which is need certificate from our CA server). I need to monitor automatically when the certificate will expired and send us the alert.

Because it was happend weeks ago, our certififate expired without anyone notice it and my exchange server refuse to communicate with others.

I;m asking to all experts, does anyone know how do I monitor the certificate expiry date using some automate script or program ?
0
 
LVL 31

Expert Comment

by:Paranormastic
ID: 22996336
I usually just check out time frames against the certification authority MMC and check that out. You can filter the results, but getting used to the filter can be a little frustrating, especially filtering out a single template - to do this you need to get the object identifier (OID) of the template - you can find the OID in certtmpl.msc - open the template - Extensions tab - Certificate Template Information - (look for the really big long number and copy that).  If you use a commercial CA, there should be a report tool that they have on your customer page.

For scripting against your CA using certutil and a link to some powershell examples, check here:
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_23611185.html

For some info with checking using OCS - this is the best thing I've been able to find so far as far as checking what is actually installed vs. what was issued:
http://www.evangelyze.net/cs/blogs/mike/archive/2008/05/28/ocs-certificate-expiration-monitoring.aspx

0
 
LVL 31

Accepted Solution

by:
Paranormastic earned 500 total points
ID: 22996400
Ack - I forgot about a link that i had come across for some scripting - I forgot to add it to my bookmarks...  here you go for checking for expiry:
http://blogs.msdn.com/sukeshak/archive/2007/09/12/how-to-check-certificate-expiry-for-webserver-iis-certificates-using-script.aspx
0
 

Author Closing Comment

by:Aryo1
ID: 31509117
Great, this is solution I needed to monitor certificate expiry date.... Thanks, you save my time
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now