http://support.microsoft.com/default.aspx?scid=kb;en-us;321051
There is no user interface for configuring LDAPS. Installing a valid certificate on a domain controller permits the LDAP service to listen for, and automatically accept, SSL connections for both LDAP and global catalog traffic.
Requirements for an LDAPS certificate
To enable LDAPS, you must install a certificate that meets the following requirements:
For more information about establishing trust for certificates, see the "Policies to establish trust of root certification authorities" topic in Windows 2000 Server Help.
Creating the certificate request
Any utility or application that creates a valid PKCS #10 request can be used to form the SSL certificate request. Use Certreq to form the request.
Note The commands that are used in this article rely on the 2003 version of Certreq. In order to use the steps in this article on a Windows 2000 server, copy certreq.exe and certcli.dll from a Windows 2003 server into a temporary directory on the Windows 2000 server.
Certreq.exe requires a text instruction file to generate an appropriate X.509 certificate request for a domain controller. You can create this file by using your preferred ASCII text editor. Save the file as an .inf file to any folder on your hard drive.
To request a Server Authentication certificate that is suitable for LDAPS, follow these steps:
1. Create the .inf file. Following is an example .inf file that can be used to create the certificate request.
;----------------- request.inf -----------------
[Version]
Signature="$Windows NT$
[NewRequest]
Subject = "CN=<DC FQDN >" ; replace with the FQDN of the DC
KeySpec = 1
KeyLength = 1024
; 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
;-----------------------------------------------
Cut and paste the sample file into a new text file named Request.inf. Provide the fully qualified DNS name of the domain controller in the request.
Note Some third-party certification authorities may require additional information in the Subject parameter. Such information includes an e-mail address (E), organizational unit (OU), organization (O), locality or city (L), state or province (S), and country or region (C). You can append this information to the Subject name (CN) in the Request.inf file. For example: Subject="[email protected], CN=<DC fqdn>, OU=Servers, O=Contoso, L=Redmond, S=Washington, C=US."
2. Create the request file. To do this, type the following command at the command prompt, and then press ENTER:
certreq -new request.inf request.req
A new file called Request.req is created. This is the base64-encoded request file.
3. Submit the request to a CA. You can submit the request to a Microsoft CA or to a third-party CA.
4. Retrieve the certificate that is issued, and then save the certificate as Certnew.cer in the same folder as the request file. To do this, follow these steps:
a. Create a new file called Certnew.cer.
b. Open the file in Notepad, paste the encoded certificate into the file, and then save the file.
Note The saved certificate must be encoded as base64. Some third-party CAs return the issued certificate to the requestor as base64-encoded text in an e-mail message.
5. Accept the issued certificate. To do this, type the following command at the command prompt, and then press ENTER:
certreq -accept certnew.cer
6. Verify that the certificate is installed in the computer's Personal store. To do this, follow these steps:
. Start Microsoft Management Console (MMC).
a. Add the Certificates snap-in that manages certificates on the local computer.
b. Expand Certificates (Local Computer), expand Personal, and then expand Certificates.
A new certificate should exist in the Personal store. In the Certificate Properties dialog box, the intended purpose displayed is Server Authentication. This certificate is issued to the computer's fully qualified host name.
7. Restart the domain controller.
For more information about creating the certificate request, see the following Advanced Certificate Enrollment and Management white paper. To view this white paper, visit the following Microsoft Web site:
http://technet.microsoft.com/en-us/library/cc782583.aspx (http://technet.microsoft.com/en-us/library/cc782583.aspx)
Verifying an LDAPS connection
After a certificate is installed, follow these steps to verify that LDAPS is enabled:
1. Start the Active Directory Administration Tool (Ldp.exe).
Note This program is installed in the Windows 2000 Support Tools.
2. On the Connection menu, click Connect.
3. Type the name of the domain controller to which you want to connect.
4. Type 636 as the port number.
5. Click OK.
RootDSE information should print in the right pane, indicating a successful connection.
Possible issues
Windows Server 2008 improvements
The original recommendation in this article was to put certificates in the Local Machine's Personal store. Although this option is supported, you can also put certificates in the NTDS Service's Personal certificate store on Windows Server 2008 and on later versions of Active Directory Domain Services (AD DS). For more information about how to add the certificate to the NTDS service's Personal certificate store, visit the following Microsoft TechNet Web site:
http://technet.microsoft.com/en-us/library/dd941846(WS.10).aspx (http://technet.microsoft.com/en-us/library/dd941846(WS.10).aspx)
AD DS preferentially looks for certificates in this store over the Local Machine's store. This makes it easier to configure AD DS to use the certificate that you want it to use. This is because there might be multiple certificates in the Local Machines Personal store, and it can be difficult to predict which one is selected.
AD DS detects when a new certificate is dropped into its certificate store and then triggers an SSL certificate update without having to restart AD DS or restart the domain controller.
A new rootDse operation that is named renewServerCertificate can be used to manually trigger AD DS to update its SSL certificates without having to restart AD DS or restart the domain controller. This attribute can be updated using adsiedit.msc, or by importing the change in LDAP Directory Interchange Format (LDIF) using ldifde.exe. For more information on using LDIF to update this attribute, visit the following Microsoft MSDN Web site:
http://msdn.microsoft.com/en-us/library/cc223311(v=PROT.10).aspx (http://msdn.microsoft.com/en-us/library/cc223311(v=PROT.10).aspx)
Finally, if a Windows Server 2008 or a later version domain controller finds multiple certificates in its store, it automatically selects the certificate whose expiration date is furthest in the future. Then, if your current certificate is approaching its expiration date, you can drop the replacement certificate in the store, and AD DS automatically switches to use it.
All these work for Windows Server 2008 AD DS and for 2008 Active Directory Lightweight Directory Services (AD LDS). For AD LDS, put certificates into the Personal certificate store for the service that corresponds to the AD LDS instance instead of for the NTDS service.
-------------------------------------------------------