Skip to content

Commit a547d1f

Browse files
committed
clearified config option
fixes #7
1 parent a40eafe commit a547d1f

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

doc/pam_pkcs11.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1687,7 +1687,7 @@ ldap_mapper configuration file shows like:
16871687
uid_attribute = "uid";
16881688
attribute_map = "<![CDATA[uid=uid&mail=email]]>", "<![CDATA[krbprincipalname=upn]]>";
16891689
# SSL/TLS-Settings
1690-
ssl = tls
1690+
ssl = starttls
16911691
# tls_randfile = ...
16921692
tls_cacertfile = /etc/ssl/cacert.pem
16931693
# tls_cacertdir = ...
@@ -1714,7 +1714,7 @@ If a ldaphost is also submitted, it will be appended to the URI list.
17141714
<varlistentry>
17151715
<term><token>ldapport</token></term>
17161716
<listitem>The LDAP Port on the server (default:
1717-
389 for LDAP and LDAP-TLS and 636 for SSL)
1717+
389 for LDAP and LDAP-TLS (STARTTLS) and 636 for LDAP-SSL (LDAPS))
17181718
</listitem>
17191719
</varlistentry>
17201720

@@ -1825,13 +1825,13 @@ collected under the attribute.
18251825
<term><token>ssl</token></term>
18261826
<listitem>Enable or disable the usage of TLS or SSL
18271827
<itemizedlist>
1828-
<listitem><option> off </option> TLS/SSL off(default)
1828+
<listitem><option> off </option> TLS/SSL off (default)
18291829
</listitem>
18301830

1831-
<listitem><option> tls </option> enable TLS
1831+
<listitem><option> starttls|tls </option> enable LDAP-TLS (STARTTLS)
18321832
</listitem>
18331833

1834-
<listitem><option> on|ssl </option> enable SSL
1834+
<listitem><option> ldaps|on|ssl </option> enable LDAP-SSL (LDAPS)
18351835
</listitem>
18361836
</itemizedlist>
18371837
</listitem>

src/mappers/ldap_mapper.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,10 +1143,14 @@ static int read_config(scconf_block *blk) {
11431143
ssltls = scconf_get_str(blk,"ssl","off");
11441144
if (! strncasecmp (ssltls, "tls", 3))
11451145
ssl_on = SSL_START_TLS;
1146+
else if( ! strncasecmp (ssltls, "starttls", 3))
1147+
ssl_on = SSL_START_TLS;
11461148
else if( ! strncasecmp (ssltls, "on", 2))
11471149
ssl_on = SSL_LDAPS;
11481150
else if( ! strncasecmp (ssltls, "ssl", 3))
11491151
ssl_on = SSL_LDAPS;
1152+
else if( ! strncasecmp (ssltls, "ldaps", 3))
1153+
ssl_on = SSL_LDAPS;
11501154

11511155
#if defined HAVE_LDAP_START_TLS_S || (defined(HAVE_LDAP_SET_OPTION) && defined(LDAP_OPT_X_TLS))
11521156
/* TLS specific options */

0 commit comments

Comments
 (0)