At Perl install the modules

	cpanm Net::LDAP
	cpanm IO::Socket::SSL

If I choose SSL encryption (port 636) and at windows event viewer there are messages like

	No suitable default server credential exists on this system. This will prevent server applications that expect to make use of the system default credentials from accepting SSL connections. An example of such an application is the directory server. Applications that manage their own credentials, such as the internet information server, are not affected by this.
	
While at my perl code I have the error  "Connection reset by peer"
Then I need at my Active Directory Server a domain controller certificate.


Add Roles and feature wizard ->
Server Roles : Active Directory Certificate Services (add sugested features) -> next ->
Features (as it is) -> next -> AD CS -> next ->
Role Services : Certification Authority , Certification Authority Web Enrollment (add sugested features)
-> next -> Web Server role (IIS) -> next ->
Role Services : if you want select any additional web features -> next -> install -> close


after install , Configure Active Directory Certificate Services -> Credentials : LOCAL\Administrator -> next
Role Services interface : Certification Authority , Certification Authority Web Enrollment -> Next
Setup Type interface : Enterprise CA -> next
CA Type : Root CA -> next
Private Key : Create a new private key -> next
Cryptography : RSA Cryptography , 2048 , SHA1 -> next
CA name : as it is -> next
Validity Period -> 10 years -> next
CA Database ( C:\Windows\system32\CertLog ) -> next -> Confirmation : configure -> close
