01 May 2009

Can the validity period of the Self-Signed Certificate that IIS 7.0 manager creates be changed ?

IIS 7.0 has a nice feature of creating self-signed certificates …  very handy for creating test certificates.

I was recently asked if there is a way to modify the validity period of the certificate it creates.

Unfortunately  No!

The module that creates the certificate uses a simple logic of incrementing the year by 1. Something like

SYSTEMTIME systemtime = new SYSTEMTIME();

systemtime.wYear = (short) (DateTime.Now.Date.Year + 1);

systemtime.wMonth = (short) DateTime.Now.Date.Month;

systemtime.wDay = (short) DateTime.Now.Date.Day;

It’s hardcoded and hence the validity of the certificate will always be 1 year from the current date.

Also the name of the certificate will always be the FQDN.

In case you want to create certificates with a shorter validity period or different names there are are a lot of tools like SelfSSL that you can use to generates self-signed certificates.


Bookmark and Share

Filed under:
 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Can the validity period of the Self-Signed Certificate that IIS 7.0 manager creates be changed ? | Microsoft Share Point said:

PingBack from http://microsoft-sharepoint.simplynetdev.com/can-the-validity-period-of-the-self-signed-certificate-that-iis-70-manager-creates-be-changed/

01 May 09 at 9:06 AM

Leave a Comment

Comment Policy: No HTML allowed. URIs and line breaks are converted automatically. Your e–mail address will not show up on any public page.

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Page view tracker