Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Detecting certificate expired date

Posted on 2008-10-23
10
2,268 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
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

861 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