Basics: Configuration file for the certification authority (capolicy.inf)
The capolicy.inf contains basic settings that can or should be specified before installing a certification authority. Put simply, no certification authority should be installed without it.
Create a capolicy.inf
Do you know TameMyCerts? TameMyCerts is an add-on for the Microsoft certification authority (Active Directory Certificate Services). It extends the function of the certification authority and enables the application of rule sets to realize the secure automation of certificate issuance. TameMyCerts is unique in the Microsoft ecosystem, has already proven itself in countless companies around the world and is available under a free license. It can be downloaded via GitHub and used free of charge. Professional maintenance is also offered.
The file is not created automatically. Accordingly, it must be created before installing a certification authority and, in case of a migration or restore , be taken over from the source system.
Version
Each capolicy.inf must begin with the "Version" extension with the following content.
[Version]
Signature= "$Windows NT$"Strings
In the "Strings" section text variables can be defined, e.g. to convert object identifiers into an easily readable format.
[Strings]
szOID_NAME_CONSTRAINTS = "2.5.29.30"Extensions
The "Extensions" section allows to define or modify extensions in the certificate request (and thus in the resulting certificate).
Example: Setting the "Name Constraints" extension of an issuing certification authority to allow DNS names in the Subject Alternative Name for "adcslabor.de" and to prevent the use of the Common Name.
[Extensions]
Critical = %szOID_NAME_CONSTRAINTS%
%szOID_NAME_CONSTRAINTS% = "{text}"
continue = "SubTree=Include&"
continue = "DNS = adcslabor.de&"
continue = "SubTree=Exclude&"
continue = "DIRECTORYNAME = CN=&"
[Strings]
szOID_NAME_CONSTRAINTS = "2.5.29.30"According to RFC 5280, name constraints are ignored for certificates for root certification authorities.
Example: Modify the "Key Usage" extension of a root certification authority. Remove "Digital Signature" and set the "Key Usage" extension as critical.
[Extensions]
2.5.29.15 = AwIBBg==
Critical = 2.5.29.15Example: Removing the extensions "CA Version" and "Previous CA Certificate Hash" from a root certification authority certificate.
[Extensions]
1.3.6.1.4.1.311.21.1= ; szOID_CERTSRV_CA_VERSION
1.3.6.1.4.1.311.21.2= ; szOID_CERTSRV_PREVIOUS_CERT_HASHSee also the following articles:
BasicConstraintsExtension
The BasicConstraintsExtension section allows to define the path length constraint of a certification authority certificate. This setting should not be applied to certificates of a root certification authority to maintain flexibility. Instead, the extension should be configured for certificates of issuing certification authorities.
[BasicConstraintsExtension]
PathLength=0
Critical=TRUEConforming CAs MUST include this extension in all CA certificates that contain public keys used to validate digital signatures on certificates and MUST mark the extension as critical in such certificates.
See also article "Basics: Path Length Constraint ".
PolicyStatementExtension
[PolicyStatementExtension]
Policies=InternalPolicy
[InternalPolicy]
OID=1.3.6.1.4.1.99999.300.2.1.4.3.1
Notice=CPS is to be found at: http://pki.adcslabor.de/CPS/index.html
URL=http://pki.adcslabor.de/CPS/index.htmlThe Trusted Platform Module (TPM) Key Attestation can optionally be used with issuance policies. If it is planned to use this, it makes sense to include the issuance policies defined for this purpose in the certification authority certificate.
See also article "Configuring the Trusted Platform Module (TPM) Key Attestation ".
Alternatively, you can also include the AnyPolicy object identifier:
[PolicyStatementExtension]
Policies=AllIssuancePolicy
[AllIssuancePolicy]
OID=2.5.29.32.0This approach should be avoided, but is explicitly allowed according to RFC 5280 .
When a CA does not wish to limit the set of policies for certification paths that include this certificate, it MAY assert the special policy anyPolicy, with a value of { 2 5 29 32 0 }.
Here is a list of common (general) issuance policies.
| OID | Description |
|---|---|
| 2.5.29.32.0 | All Issuance Policies (AnyPolicy) |
| 1.3.6.1.4.1.311.21.32 | TPM Key Attestation : User Credentials: (Low Assurance) |
| 1.3.6.1.4.1.311.21.31 | TPM Key Attestation : Endorsement Certificate: (Medium Assurance) |
| 1.3.6.1.4.1.311.21.30 | TPM Key Attestation : Endorsement Key: (High Assurance) |
EnhancedKeyUsageExtension
In the "EnhancedKeyUsageExtension" section, the "Extended Key Usage" extension of a certification authority certificate can be edited in order to limit the range for issuing certificates.
Microsoft uses the term "Enhanced Key Usage", the correct name according to RFC 5280 is "Extended Key Usage" .
[EnhancedKeyUsageExtension]
OID=1.3.6.1.5.5.7.3.1 ; Client Authentication
OID=1.3.6.1.5.5.7.3.2 ; Server Authentication
OID=1.3.6.1.5.5.7.3.9 ; OCSP Signing
OID=1.3.6.1.4.1.311.21.5 ; Private Key Archival
Critical=FALSEUnfortunately, RFC 5280 is silent on restrictions of extended key usages in certification authority certificates. The assessment must therefore be made individually for each use case.
The CA/Browser Forum (CAB), which is responsible for certificate processing in the common browsers, recommends , for example for SSL, restricting the extended key usages of a certification authority and advises marking the extension as non-critical.
Regarding smart card logon, however, in the default setting domain controllers ignore the restriction of extended key usages completely, for example.
See also the following articles:
- Basics: Restricting Extended Key Usage (EKU) in Certification Authority Certificates
- Domain controllers do not check extended key usage on smart card logon
In addition to the provided Extended Key Usages, restrictions should always include "Private Key Archival" and "OCSP Signing". If a Network Device Enrollment Service (NDES) is connected to the certification authority, the "Certificate Request Agent" Extended Key Usage is also required.
Here is a list of common extended key usages:
| OID | Description |
|---|---|
| 1.3.6.1.4.1.311.20.2.1 | Certificate Request Agent |
| 1.3.6.1.5.5.7.3.2 | Client Authentication |
| 1.3.6.1.5.5.7.3.3 | Code Signing |
| 1.3.6.1.4.1.311.10.3.13 | Lifetime Signing |
| 1.3.6.1.4.1.311.10.3.12 | Document Signing |
| 1.3.6.1.4.1.311.80.1 | Document Encryption |
| 1.3.6.1.4.1.311.10.3.4 | Encrypting file system |
| 1.3.6.1.4.1.311.10.3.4.1 | File Recovery |
| 1.3.6.1.5.5.7.3.5 | IP Security End System |
| 1.3.6.1.5.5.8.2.2 | IP Security IKE Intermediate |
| 1.3.6.1.5.5.7.3.6 | IP Security Tunnel Endpoint |
| 1.3.6.1.5.5.7.3.7 | IP Security User |
| 1.3.6.1.4.1.311.21.6 | Key Recovery Agent |
| 1.3.6.1.4.1.311.10.3.11 | Key Recovery |
| 1.3.6.1.5.2.3.5 | KDC Authentication |
| 1.3.6.1.4.1.311.10.3.1 | Microsoft Trust List Signing |
| 1.3.6.1.4.1.311.10.3.10 | Qualified Subordination |
| 1.3.6.1.4.1.311.10.3.9 | Root List Signer |
| 1.3.6.1.5.5.7.3.4 | Secure E-mail |
| 1.3.6.1.5.5.7.3.1 | Server Authentication |
| 1.3.6.1.4.1.311.20.2.2 | Smartcard Logon |
| 1.3.6.1.5.5.7.3.8 | Time Stamping according to RFC 3161 |
| 1.3.6.1.5.5.7.3.9 | OCSP Signing |
| 1.3.6.1.4.1.311.54.1.2 | Remote Desktop Authentication |
| 1.3.6.1.4.1.311.21.5 | Private Key Archival |
NameConstraintsExtension
Allows the definition of name constraints for the certification authority certificate.
[NameConstraintsExtension]
Include = PermittedSubtrees
Critical = True
[PermittedSubtrees]
DirectoryName = CN=ADCS Labor Test Issuing CA 1-Xchg
DNS = .intra.adcslabor.deSee article "Basics: Name Constraints ".
Certsrv_Server
In this section, settings for the certification authority process can be defined.
| Parameter | Description |
|---|---|
| RenewalKeyLength | Applied only when renewing the certification authority certificate with a new key pair. Indicates the key size to be used in this case. |
| RenewalValidityPeriod | Affects only root certification authorities. Used only when renewing the certification authority certificate of a root certification authority (this authority itself determines its own certificate validity). |
| RenewalValidityPeriodUnits | Affects only root certification authorities. Used only when renewing the certification authority certificate of a root certification authority (this authority itself determines its own certificate validity). |
| AlternatesignatureAlgorithm | Affects only root certification authorities. If the value is set to "0", the PKCS#1 padding scheme version 1.5 is used. If the value is set to "1", the PKCS#1 padding scheme version 2.1 is used. |
| ForceUTF8 | Affects only root certification authorities. Forces the encoding of the certification authority's "Common Name" in UTF-8 (otherwise only if it contains special characters). May cause compatibility problems and should therefore not be used if possible. |
| LoadDefaultTemplates | Affects only Active Directory-integrated certification authorities (enterprise CA). If the value is set to "1" or not defined, a set of default certificate templates is automatically published on the certification authority - therefore the value should be defined and set to "0" to prevent this. |
See also the following articles:
- Deploy PKCS#1 version 2.1 for a root CA (own and issued certificates)
- Description of the necessary configuration settings for the "Common PKI" certificate profile
- (Re-)Installing the Microsoft Standard Certificate Templates
Example of typical settings for a root certification authority:
[Certsrv_Server]
RenewalKeyLength=4096
RenewalValidityPeriod=Years
RenewalValidityPeriodUnits=8
AlternateSignatureAlgorithm=0
ForceUTF8=1Example of typical settings of an issuing certification authority:
[Certsrv_Server]
RenewalKeyLength=4096
LoadDefaultTemplates=0
AlternateSignatureAlgorithm=0In the last "official" book on Microsoft Active Directory Certificate Services, "Microsoft Windows Server 2008 PKI and Certificate Security " by Brian Komar, incorrectly refers to DiscreteSignatureAlgorithm, and the values were exactly reversed. At the time the book went to press, this was also correct, but with the transition from the beta version of Windows Server 2008 to the final version, the directive was renamed to "AlternateSignatureAlgorithm", including reversed behavior. Thus, PKCS#1 version 1.5 continued to be used as the default setting if the directive was not explicitly configured.
Save the file
The file must be saved in the C:\Windows directory with ANSI encoding before configuring the certification authority role.
The designation "ANSI" corresponds to the character code Windows-1252 (Latin-1, Western European) in the Windows ecosystem.

Legacy and unusual settings
For the sake of completeness, here are some settings that are hardly relevant in practice nowadays.
CRLDistributionPoint and AuthorityInformationAccess
In this section, an extension for CRL distribution points or for Authority Information Access (AIA) can be entered in the certificate request.
The section should no longer be used. Sections in capolicy.inf (with the exception of the CertSrv_Server section) are written to the certificate request for the certification authority and are overwritten by the parent certification authority anyway. So the paths are set in the configuration of the parent certification authority. If you want to customize the CRL distribution points or the Authority Information Access for the certification authority, you do this via the registry of the installed certification authority.
[CRLDistributionPoint]
URL=http://pki.adcslabor.de/CertData/MeineCrl.crl
[AuthorityInformationAccess]
URL=http://pki.adcslabor.de/CertData/MeinCaZertifikat.crtAlso, the "Empty=true" directive in these sections is no longer required for root CA certificates since Windows Server 2008.
See also article "Token for CDP and AIA configuration of a certification authority ".
Settings that can also be set via the registry of the certification authority
The following settings can be set in the CertSrv_Server section. They are optional and identical to the value of the same name in the certification authority registry. Thus, it makes sense to set them there as well after a certification authority installation.
The "Unit" values are given in the following format: "Minutes", "Hours", "Days", "Weeks", "Months", "Years".
| Parameter | Description |
|---|---|
| ClockSkewMinutes | Describes the difference (plus/minus) of issued certificates to the system time in minutes to compensate for any time differences. |
| CRLPeriod | Describes the units for the validity of the CRLs. |
| CRLPeriodUnits | Describes the numerical value for the associated unit. |
| CRLOverlapPeriod | Describes the units for the overlap period of the CRLs. |
| CRLOverlapUnits | Describes the numerical value for the associated unit. |
| CRLDeltaPeriodUnits | Describes the units for the validity of the delta CRLs. |
| CRLDeltaPeriod | Describes the numerical value for the associated unit. |
| CRLDeltaOverlapUnits | Describes the units for the overlap period of the delta CRLs. |
| CRLDeltaOverlapPeriod | Describes the numerical value for the associated unit. |
Unusual other settings
| Parameter | Description |
|---|---|
| EnableKeyCounting | If this option is enabled (value set to "1"), a counter is incremented each time the private key is used. However, this function must be supported by the corresponding key storage provider. |
Related links:
- Umlauts in certification authority certificates
- Basics: Restricting Extended Key Usage (EKU) in Certification Authority Certificates
- Frequently Used Extended Key Usages and Issuance Policies
- Basics: key algorithms, signature algorithms and signature hash algorithms
- Deploy PKCS#1 version 2.1 for a root CA (own and issued certificates)
- Description of the necessary configuration settings for the "Common PKI" certificate profile
- Use name constraints to allow a certification authority to issue certificates only for specific domain names
- (Re-)Installing the Microsoft Standard Certificate Templates
- Token for CDP and AIA configuration of a certification authority
- Character encoding in the Subject Distinguished Name of certificate requests and issued certificates
External sources
- Prepare the CAPolicy.inf File (Microsoft)
- Windows Server 2008 R2 CAPolicy.inf Syntax (Microsoft, archive link)
- Baseline Requirements for the Issuance and Management of Publicly-Trusted Certificates (CA/Browser Forum)
- Three decades of Unicode (Golem Media GmbH)
