Valid HTML 4.01 Transitional Valid CSS Valid SVG 1.0

Me, myself & IT

Generate (self-signed) X.509 Certificates with CertReq.exe



Use Windows’® CertReq.exe to issue (self-signed) X.509 certificates.


Setup and operate your own PKI, run your own CA, issue X.509 certificates for client authentication, server authentication, code signing, secure email (S/MIME), IP security, time stamping, …


Replace the items enclosed in angle quotes ‹…› in the [Strings] section of the following (sample) script with your own data and save it as file ‹filename›.inf:
; Copyright © 2009-2020, Stefan Kanthak <‍stefan‍.‍kanthak‍@‍nexgo‍.‍de‍>

Provider  = "Stefan Kanthak"
Signature = "$Windows NT$"

MailAddress  = "‹mailbox›@‹domain›.‹tld›"
CommonName   = "‹firstname› ‹lastname›"
GivenName    = "‹firstname›"
SurName      = "‹lastname›"
Initials     = "‹initials›"
Title        = "‹title›"
OrgUnit      = "‹organisational unit›"     ; or ‹department›
Organisation = "‹organisation›"            ; or ‹company›
Street       = "‹street›"
Locality     = "‹city›"
State        = "‹state›"                   ; or ‹province›
Country      = "‹two-letter country code›" ; DE, GB, US, …

;AlternateSignatureAlgorithm = FALSE
;EncipherOnly = FALSE
;EncryptionAlgorithm =
;EncryptionLength =
Exportable = TRUE
;ExportableEncrypted = FALSE
FriendlyName = "%CommonName% <%MailAddress%>"
HashAlgorithm = SHA256
;KeyAlgorithm = RSA
;KeyContainer =
KeyLength = 4096
;KeyProtection = 2
KeySpec = 2
KeyUsage = 0x00FC
KeyUsageProperty = 0xFFFFFF
;MachineKeySet = FALSE
;NotAfter = "mm/dd/yyyy hh:mm AM"
;NotBefore = "mm/dd/yyyy hh:mm PM"
;PrivateKeyArchive = FALSE
ProviderName = "Microsoft Enhanced RSA and AES Cryptographic Provider"
ProviderType = 24
RequestType = CERT
;Silent = FALSE
Subject = "E=%MailAddress%, CN=%CommonName%, G=%GivenName%, SN=%SurName%, I=%Initials%, T=%Title%, OU=%OrgUnit%, O=%Organisation%, STREET=%Street%, L=%Locality%, S=%State%, C=%Country%"
;UserProtected = FALSE
ValidityPeriod = Years
ValidityPeriodUnits = 3

; Subject Alternative Name = "{text}EMail=%MailAddress%"
; Basic Constraints = "{text}CA=0&PathLength=0"
; Enhanced Key Usage = "{text},,,,,,,,,…"
Critical =

OID =  ; Client Authentication
OID =  ; Server Authentication
OID =  ; Code Signing
OID =  ; Secure E-mail
OID =  ; IP Security End System
OID =  ; IP Security Tunnel Endpoint
OID =  ; IP Security User
OID =  ; Time Stamping
OID = ; IP Security Key Exchange (IKE)


Perform the following operations using only tools shipped with Windows.


If you miss anything here, have additions, comments, corrections, criticism or questions, want to give feedback, hints or tipps, report broken links, bugs, deficiencies, errors, inaccuracies, misrepresentations, omissions, shortcomings, vulnerabilities or weaknesses, …: don’t hesitate to contact me and feel free to ask, comment, criticise, flame, notify or report!

Note: email in weird format and without a proper sender name is likely to be discarded!

I dislike HTML (and even weirder formats too) in email, I prefer to receive plain text.
I also expect to see your full (real) name as sender, not your nickname.
I abhor top posts and expect inline quotes in replies.

Terms and Conditions

By using this site, you signify your agreement to these terms and conditions. If you do not agree to these terms and conditions, do not use this site!

Data Protection Declaration

This web page records no (personal) data and stores no cookies in the web browser.

The web service is operated and provided by

Telekom Deutschland GmbH
Business Center
D-64306 Darmstadt
+49 800 5252033

The web service provider stores a session cookie in the web browser and records every visit of this web site with the following data in an access log on their server(s):

Copyright © 1995–2020 • Stefan Kanthak • <‍stefan‍.‍kanthak‍@‍nexgo‍.‍de‍>