Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS: can't accept: A disallowed SNI server name has been received #383

Closed
regeda opened this issue Nov 26, 2019 · 1 comment
Closed

TLS: can't accept: A disallowed SNI server name has been received #383

regeda opened this issue Nov 26, 2019 · 1 comment

Comments

@regeda
Copy link

regeda commented Nov 26, 2019

I get the error when I try to validate the TLS connection.

My docker-compose.yml is:

version: '3.1'

services:
  openldap_1:
    image: osixia/openldap:1.3.0
    command: --loglevel debug --copy-service
    environment:
      HOSTNAME: openldap_1
      LDAP_LOG_LEVEL: 1
      LDAP_ORGANISATION: XYZ
      LDAP_DOMAIN: xyz.org
      LDAP_ADMIN_PASSWORD: admin
      LDAP_CONFIG_PASSWORD: config
      LDAP_BACKEND: mdb
      LDAP_REMOVE_CONFIG_AFTER_SETUP: 'false'
    tty: true
    stdin_open: true
    volumes:
      - /var/lib/ldap
      - /etc/ldap/slapd.d

I run the command in a container:

openssl s_client -CApath /container/run/service/slapd/assets/certs -servername openldap_1 -connect openldap_1:636

Then I get the output from a container:

openldap_1_1   | 5ddd5f18 slap_listener_activate(7):
openldap_1_1   | 5ddd5f18 >>> slap_listener(ldaps://openldap_1)
openldap_1_1   | 5ddd5f18 connection_get(12): got connid=1002
openldap_1_1   | 5ddd5f18 connection_read(12): checking for input on id=1002
openldap_1_1   | TLS: can't accept: A disallowed SNI server name has been received..
openldap_1_1   | 5ddd5f18 connection_read(12): TLS accept failure error=-1 id=1002, closing
openldap_1_1   | 5ddd5f18 connection_close: conn=1002 sd=12

Does anybody know how to fix that?

@regeda
Copy link
Author

regeda commented Nov 28, 2019

I found the root cause: https://github.com/gnutls/gnutls/blob/master/lib/str.h#L63

TLS doesn't allow underscore in a domain name.

openldap_1 should be renamed by openldap1.

@regeda regeda closed this as completed Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant