Can't specify a certificate EXPIRY_DATE

  • Hi,

    Just the other day we noticed that a certificate had an expiry_date that was fast approaching. Been experimenting

    on a test certificate to see how far in future the date can be set but it appears that your can't change this value directly.

    e.g.

    DROP CERTIFICATE DavesCertificate

    CREATE CERTIFICATE DavesCertificate WITH SUBJECT = 'Test', EXPIRY_DATE = '10/20/2010', START_DATE = '10/16/2009'

    SELECT name, expiry_date FROM sys.certificates WHERE name = 'DavesCertificate'

    Which returns

    name expiry_date

    DavesCertificate2010-10-16 00:00:00.000

    I read on another forum that SQL Server 2005 ignores expiry dates, can anyone else confirm this?

    Thanks in advance

    Dave

  • Apparently there is a little bug in this create statement !!

    It works if you first specify the start date and then the expire date !

    CREATE CERTIFICATE DavesCertificate

    WITH SUBJECT = 'Test', START_DATE = '10/16/2009', EXPIRY_DATE = '10/20/2010'

    Johan

    Learn to play, play to learn !

    Dont drive faster than your guardian angel can fly ...
    but keeping both feet on the ground wont get you anywhere :w00t:

    - How to post Performance Problems
    - How to post data/code to get the best help[/url]

    - How to prevent a sore throat after hours of presenting ppt

    press F1 for solution, press shift+F1 for urgent solution 😀

    Need a bit of Powershell? How about this

    Who am I ? Sometimes this is me but most of the time this is me

  • ALZDBA (10/14/2009)


    Apparently there is a little bug in this create statement !!

    It works if you first specify the start date and then the expire date !

    CREATE CERTIFICATE DavesCertificate

    WITH SUBJECT = 'Test', START_DATE = '10/16/2009', EXPIRY_DATE = '10/20/2010'

    Thanks for that, that really is a sneaky little bug!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply