Saturday, May 29, 2010

CSR Generation and Certificate Installation through Command for windows Servers

Dear All,

We can generate CSR and Install SSL through Command Line Interface for
windows Servers. The Steps are as below.

Save the following file as request.inf on your server editing the subject
according to the comment:

;----------------- request.inf -----------------

[Version]

Signature="$Windows NT$"

[NewRequest]

;Change to your,country code, company name and common name
Subject = "C=US, O=Acme Safe Co, CN=store.acmesafe.com"

KeySpec = 1

KeyLength = 2048

; Can be 1024, 2048, 4096, 8192, or 16384.

; Larger key sizes are more secure, but have

; a greater impact on performance.

Exportable = TRUE

MachineKeySet = TRUE

SMIME = False

PrivateKeyArchive = FALSE

UserProtected = FALSE

UseExistingKeySet = FALSE

ProviderName = "Microsoft RSA SChannel Cryptographic Provider"

ProviderType = 12

RequestType = PKCS10

KeyUsage = 0xa0

[EnhancedKeyUsageExtension]

OID=1.3.6.1.5.5.7.3.1 ; this is for Server Authentication / Token Signing

;-----------------------------------------------

then run:

c:\>certreq -new request.inf request.csr

This will generate your csr.. When your certificate is issued you'll
receive a file called store_acmesafe_com.cer. Save it on the server and
from the same directory run:

C:\>certreq -accept store_acmesafe_com.cer

This will install the cert in the Windows certificate store and it will be
available in IIS, MMC, Exchange, LDAP/Active Directory, Terminal Services
etc...

No comments:

Post a Comment