Title: Viewing the hostname in an SSL certificate Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The hostname in an SSL certificate used for LDAP must match the hostname entered in the conf.php file (this is the SSL certificate actually installed on the LDAP server, not the CA certificate). If you have no control over making it match, you can just put an entry in /etc/hosts with the IP of the LDAP server and the hostname that is in the certificate. To view the hostname in the certificate, you need a file containing the certificate (mycert.pem is used in the example). Run the following command to see the hostname that is set in the certificate:
openssl x509 -in /tmp/mycert.pem -subject -noout
You should see something like:
subject= /OU=Domain Control Validated/CN=ldap.example.edu
The hostname is after the **CN=** part. So, **ldap.example.edu** is the hostname in this example.