Solved

Detecting certificate expired date

Posted on 2008-10-23
10
2,252 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

813 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