Microsoft KB Archive/276339

= Certificate Server and KMS Do Not Grant Certificate if DN Is Too Long =

Article ID: 276339

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Windows NT Server 4.0, Terminal Server Edition
 * Microsoft Windows NT Server 4.0 Standard Edition
 * Microsoft Windows NT Server 4.0 Enterprise Edition

-



This article was previously published under Q276339



IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
Certificate Server and Key Management Server (KMS) may not grant a certificate to a client that requests one.



CAUSE
This issue can occur if the Distinguished Name (DN) is too long for the certificate server. Each individual CN= string is less than 64 characters. Certificate Server version 1.0 enforces the limit only on the concatenation of all like Relative Distinguished Names. Certificate Server 1.0 enforces the limit on the concatenated string length only, and it is not possible to disable the enforcement, because the database schema is fixed.

Certificate Server 2.0 (in Microsoft Windows 2000 Server) enforces the length limit on each Relative Distinguished Name (RDN) component, and this enforcement can be disabled by editing the registry. It also enforces a much larger limit on the concatenated string length by using the DB schema (8192 characters for CN=).



RESOLUTION
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

To disable the length enforcement, you must make a registry change on the Certificate Server. You can do so by using the Certutil tool or Regedt32.exe:

Certutil

 * 1) Open a command prompt.
 * 2) Type net stop &quot;certificate services&quot;, and then press ENTER.
 * 3) Type certutil -setreg ca\EnforceX500NameLengths 0, and then press ENTER.
 * 4) Type net start &quot;certificate services&quot;, and then press ENTER.

Regedt32.exe
Set the following registry value to zero:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CertSvc\Configuration\\EnforceX500NameLengths

Stop and restart the certificate services.



MORE INFORMATION
The following is sample Certutil output from the preceding request: certutil -v request.der PKCS10 Certificate Request: Version: 1 Subject: CN=short CN=really really really really really really long container name CN=recipients OU=grahammsite O=grahammorg [0,0]: CERT_RDN_PRINTABLE_STRING, Length = 10 (10/64 Characters) 2.5.4.10 Organization (O)=&quot;grahammorg&quot; 67 72 61 68 61 6d 6d 6f 72 67                     grahammorg

[1,0]: CERT_RDN_PRINTABLE_STRING, Length = 11 (11/64 Characters) 2.5.4.11 Organizational Unit (OU)=&quot;grahammsite&quot; 67 72 61 68 61 6d 6d 73 69 74 65                  grahammsite

[2,0]: CERT_RDN_PRINTABLE_STRING, Length = 10 (10/64 Characters) 2.5.4.3 Common Name (CN)=&quot;recipients&quot; 72 65 63 69 70 69 65 6e 74 73                     recipients

[3,0]: CERT_RDN_PRINTABLE_STRING, Length = 61 (61/64 Characters) 2.5.4.3 Common Name (CN)=&quot;really really really really really really long container name&quot; 72 65 61 6c 6c 79 20 72 65 61 6c 6c 79 20 72 65   really really re        61 6c 6c 79 20 72 65 61  6c 6c 79 20 72 65 61 6c   ally really real 6c 79 20 72 65 61 6c 6c 79 20 6c 6f 6e 67 20 63   ly really long c        6f 6e 74 61 69 6e 65 72  20 6e 61 6d 65            ontainer name

[4,0]: CERT_RDN_PRINTABLE_STRING, Length = 5 (5/64 Characters) 2.5.4.3 Common Name (CN)=&quot;short&quot; 73 68 6f 72 74                                    short

Keywords: kbprb KB276339

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.