Habe einen LDAP-Server laufen, der wunderbar auf Port 389 funktioniert. Nun soll die Kommunikation über SSL abgesichert werden. Zertifikat ist erstellt und der LDAP-Server lauscht auf Port 636:
Code: Alles auswählen
# netstat -tulpn
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 5223/sshd
tcp 0 0 172.20.10.1:636 0.0.0.0:* LISTEN 7147/slapd
Code: Alles auswählen
openssl s_client -connect ldapserver:636
CONNECTED(00000003)
depth=1 /C=DE/ST=Germany/L=Stadt/O=Firma/OU=EDV/CN=Firma/emailAddress=admin@firma.de
verify error:num=19:self signed certificate in certificate chain
verify return:0
---
Certificate chain
0 s:/C=DE/ST=Germany/L=Stadt/O=Firma/OU=EDV/CN=ldapserver.firma.intern/emailAddress=admin@firma.de
i:/C=DE/ST=Germany/L=Stadt/O=Firma/OU=EDV/CN=Firma/emailAddress=admin@firma.de
1 s:/C=DE/ST=Germany/L=Stadt/O=Firma/OU=EDV/CN=Firma/emailAddress=admin@firma.de
i:/C=DE/ST=Germany/L=Stadt/O=Firma/OU=EDV/CN=Firma/emailAddress=admin@firma.de
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHzCCBQ+gwIBAgIBATANBgkqhkiG9w0BAQUFADCBkDELMAkGA1UEBhCREUx
EDAOBgNVBAgTB0dlc1hbnkxEDAOBgNVBAcTB0xlaXB6aWcxFDASBgNVBAoTC0Rp
Z2l0YWx6b25lMQwwCgYDVQQLEwNFFYxFDASBgNVBAMTC0RpZ2l0YWx6b25lMSMw
IQYKoZIhvcNAkBFhRhZG1pbkBkaWdpdGFsem9uZS5kZTAeFw0wNzEwMDUxNDEw
NDlaFw0xMzAMjcxNDEwNDlaMIGgMQswCQYDVQQGEwJERTEQMA4GA1UECBMHR2Vy
bWFuTEQMA4GA1UEBxMHTGVpcHppZzEUMBIG1UEChMLRGlnaXhbHpvbmUxDDAK
BgNVBAsTA0VEV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AwDgYDVQQI
EwdHZXJtYW55MRAwDgYDVQQHEwdMZWlwemlnMRQwEgYDVQQKEwtEaWdpdGFsem9u
ZTEMMAoGA1UECxMDRURWMRQwEgYDVQQDEwtEaWdpdGFsem9uZTEjMHRIEGDAW
gRRhZG1pbkBkaWdpdGFsem9uZS5kZTAfBgNVHREEGDAWgRRhZG1pbkBkaWdpdGFs
em9uZS5kZTANBgkqhkiG9w0BAQUFAAOCAgEAbfz6AFQsiztzF6o6zJ2+FaDUtN8k
u7170DNcQKQ6hBY2/ZS93oObvi685kx+UzfKQDGOzIaST+BG5rXaKhG1W6+fNTnA
QmLVwd0v300xdttlIZus4WIoWMryOL6KnCW8kTn6OIV7efhplSGK68/FodJaPkV1
QLe1BEkBzxTyCCkhs71P72Tvla8iMSKQDN0aUvnazE12hTctdosCwceF9sTiSlw
tmBIJ2r34YCsImAKDYIgx6zW7gOCXiGUY82HmormO738oSfyRtOLEOvjii9FHbIZ
d7Mp/45ecn+wG0RvAvwgNFv5LtTBXBIHsMorXJx03E3/CDE+f+AARxg7lw2LWBgT
9Iqc0Nj6HtB3DHFAQoFw9NllYQik1hhyncYD2f4xhA8HMKWbyPTec+6DdioIwD8
bj1BqjcdOoYsmF9P5/pFjYTP0S3EWdHijqFmyJ1bgsfF9H+U2x3JGOMQywrb9E94
3jxGICeJmeIGV/B33Wj156S3ccQOnbThsB1NesPVq1Uf3HFVHEKUWQzWEu99iu6c
kTTXOFS7rSnbM61WwifMzof1QY357ma+aGEKZiGc/NbOth3xpowh7Bor4RMG2Q
1BruL2KiXgDJ+v1Q6MBP7w1nFW1KTMuUKY5p4PIpBWEbC3z68H19wESnu2UlhVS
acEHlIbLjP/53ME=
-----END CERTIFICATE-----
subject=/C=DE/ST=Germany/L=Stadt/O=Firma/OU=EDV/CN=ldapserver.firma.intern/emailAddress=admin@firma.de
issuer=/C=DE/ST=Germany/L=Stadt/O=Firma/OU=EDV/CN=Firma/emailAddress=admin@firma.de
---
No client certificate CA names sent
---
SSL handshake has read 3827 bytes and written 700 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 4096 bit
Compression: NONE
Expansion: NONE
SSL-Session:
Protocol : TLSv1
Cipher : AES256-SHA
Session-ID: 01D18BA5A9F3C5A2A8A2DDCD7AD11EF71E0D965368F27F0F77AD3D5554AC
Session-ID-ctx:
Master-Key: 0AA7867C0733C866FBED85D0A45F61A1E780875E57D08ED62A56D8A15357A9B84928F1DD3ECAD13D19B0A0E03
Key-Arg : None
Start Time: 1191847551
Timeout : 300 (sec)
Verify return code: 19 (self signed certificate in certificate chain)
---
Code: Alles auswählen
ldapsearch -x -H "ldaps://ldapserver.firma.intern"
ldap_bind: Can't contact LDAP server (-1)
additional info: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
McAldo