Solved

Detecting certificate expired date

Posted on 2008-10-23
10
2,279 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
[X]
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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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 …

733 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