Skip to content

can't specify empty username/password to ldap server #22162

Description

@yoneyajp

I did this

I'm using curl to download CRL for x.509 certificates like follows.

$ curl-8.20.0 -u : 'ldap://ldap.example.com/o=xxx,c=xxx?certificateRevocationList' >CRL.ldif

This method work fine with curl-8.20.0 or prior (except for early curl-8.19.0), but does not curl-8.21.0.

$ curl-8.21.0 -u : 'ldap://ldap.example.com/o=xxx,c=xxx?certificateRevocationList' >CRL.ldif
curl: (38) LDAP local: bind via ldap_win_bind 資格情報が無効です <-- Invalid credentials

I also tried below, but does not work as well.

$ curl-8.21.0 'ldap://:@ldap.example.com/o=xxx,c=xxx?certificateRevocationList' >CRL.ldif
curl: (38) LDAP local: bind via ldap_win_bind 資格情報が無効です <-- Invalid credentials

I expected the following

I want to specify empty username/password to ldap server using curl.

curl/libcurl version

curl 8.21.0 (x86_64-w64-mingw32) libcurl/8.21.0 LibreSSL/4.3.2 zlib/1.3.1.zlib-ng brotli/1.2.0 zstd/1.5.7 WinIDN libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.69.0 ngtcp2/1.23.0 nghttp3/1.16.0 WinLDAP
Release-Date: 2026-06-24

operating system

Windows 11 Pro 25H2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions