Merge request !1592 broke my testing setup
jamesb192
jamesb192 at jamesb192.com
Wed Nov 11 11:20:03 UTC 2026
Hal Murray wrote:
> This is the name from CN vs SAN tangle.
>
> > commit fd749194f36d9795db234164a8943eadb064c5fc
> >
> > Author: Matt Selsky <matthew.selsky at twosigma.com>
> >
> > Date: Tue Nov 10 01:29:28 2026 +0000
> >
> > ntpd/nts_client.c: RFC 8915 fixes for NTS-KE response parsing
>
> RFC 8915 section 3 requires clients to follow RFC 6125 when checking
>
> the NTS-KE server's identity, and RFC 6125 section 6.4.4 forbids
>
> matching the subject Common Name when the certificate has DNS names
>
> in its Subject Alternative Name. "Fix derecation warning from OpenSSL
>
> 4.1.0-alpha1" set X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT so that a
>
> self-signed test certificate would match by CN, which makes OpenSSL
>
> accept a certificate whose CN, but none of whose DNS SANs, names the
>
> server.
>
>
> Drop the flag. Without it, X509_check_host(3) documents that the CN
>
> is still checked when a certificate has no DNS SANs. A test
>
> certificate that relies on its CN needs the name added as a DNS SAN,
>
> or the client's server line needs noval.
>
> - SSL_set_hostflags(ssl, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS |
>
> X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT);
>
> + SSL_set_hostflags(ssl, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
>
> ------
>
> Does anybody else use self signed certificates for testing on their local
>
> LAN?
I use Let's Encrypt for my single polynymous machine.
My NTPsec install is probably lagging behind HEAD.
> I set things up ages ago, I got the host name into the CN slot and left
>
> the SAN slot empty. If I'm the only one with this problem, then we should
>
> add a note in NEWS and I'll figure out how to fix my stuff. If others
>
> have the same problem, maybe we should put a warning in the next release
>
> announcement and give others a release cycle to fix their stuff.
>
> ------
>
> From the above:
>
> > Without it, X509_check_host(3) documents that the CN
>
> > is still checked when a certificate has no DNS SANs
>
> That sounds like my setup should work. But it doesn't. Is this a bug in
>
> OpenSSL?
>
> -------
>
> Does anybody have a good recipe for making self signed certificates?
I had one I experimented with momentarily.
The Internet would eat it and still be hungry.
TLDW: I was trying to get the smallest possible working certificate.
The following is likely approaching it wrong.
$ cat >127.cnf <<<EEND
[req]
prompt=no
req_extensions = v3_req, req_ext
distinguished_name = req_distinguished_name
[req_distinguished_name]
CN = Scotch
[v3_req]
keyUsage = keyEncipherment, dataEncipherment
extendedKeyUsage = serverAuth
[ req_ext ]
subjectAltName = @alt_names
[ alt_names ]
DNS.1 = localhost
DNS.2 = scotch.local
IP.1 = 127.0.0.1
IP.2 = ::1
EEND
$ openssl genpkey -algorithm ED25519 > 127.key
$ openssl req -new -out 127.csr -key 127.key -config 127.cnf
$ openssl x509 -req -days 735 -in 127.csr -signkey 127.key -out 127.crt
-30-
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20261111/ff9b24d4/attachment.htm>
More information about the devel
mailing list