<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libtls/tls_peer.c, branch OPENBSD_7_9_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2024-12-10T08:40:30+00:00</updated>
<entry>
<title>Provide tls_peer_cert_common_name()</title>
<updated>2024-12-10T08:40:30+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-12-10T08:40:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d3da05396af6da5d0c94da0425031aa4fd529ac9'/>
<id>urn:sha1:d3da05396af6da5d0c94da0425031aa4fd529ac9</id>
<content type='text'>
There is currently no sane way of getting your hands on the common name or
subject alternative name of the peer certificate from libtls. It is possible
to extract it from the peer cert's PEM by hand, but that way lies madness.
While the common name is close to being deprecated in the webpki, it is
still the de facto standard to identify client certs. It would be nice to
have a way to access the subject alternative names as well, but this is a
lot more difficult to expose in a clean and sane C interface due to its
multivaluedness.

Initial diff from henning, with input from beck, jsing and myself
henning and bluhm have plans of using this in syslogd.

ok beck
</content>
</entry>
<entry>
<title>Rework name verification code so that a match is indicated via an argument,</title>
<updated>2017-04-10T17:11:13+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2017-04-10T17:11:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=2c72bbf2735f97ac7b152b55787c620ee18ae10f'/>
<id>urn:sha1:2c72bbf2735f97ac7b152b55787c620ee18ae10f</id>
<content type='text'>
rather than return codes. More strictly follow RFC 6125, in particular only
check the CN if there are no SAN identifiers present in the certificate
(per section 6.4.4).

Previous behaviour questioned by Daniel Stenberg &lt;daniel at haxx dot se&gt;.

ok beck@ jca@
</content>
</entry>
<entry>
<title>Add tls_peer_cert_chain_pem - To retreive the peer certificate and chain</title>
<updated>2017-04-05T03:19:22+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2017-04-05T03:19:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=9290adf6754a1cc7020fd33160501d9c82e5d0dd'/>
<id>urn:sha1:9290adf6754a1cc7020fd33160501d9c82e5d0dd</id>
<content type='text'>
as PEM format. This allows for it to be used or examined with tools
external to libtls
bump minor
ok jsing@
</content>
</entry>
<entry>
<title>Stick with the usual 'if NULL return NULL' idiom.</title>
<updated>2016-08-22T17:08:10+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2016-08-22T17:08:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=58a84e12a7e6b4b5ef57579ecf1c1eb19e485568'/>
<id>urn:sha1:58a84e12a7e6b4b5ef57579ecf1c1eb19e485568</id>
<content type='text'>
ok beck@
</content>
</entry>
<entry>
<title>Add tls_peer_cert_notbefore and tls_peer_cert_notafter to expose peer certificate</title>
<updated>2015-10-07T23:33:38+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2015-10-07T23:33:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=5d82be7da232ba0ac24e658d65265454ddebf89c'/>
<id>urn:sha1:5d82be7da232ba0ac24e658d65265454ddebf89c</id>
<content type='text'>
validity times for tls connections.
ok jsing@
</content>
</entry>
<entry>
<title>Move connection info into it's own private structure allocated and filled in</title>
<updated>2015-09-12T21:00:38+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2015-09-12T21:00:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=843b2711f954203e88a74d8355945a89c1ab90f1'/>
<id>urn:sha1:843b2711f954203e88a74d8355945a89c1ab90f1</id>
<content type='text'>
at handshake time. change accessors to return const char * to remove need
for caller to free memory.
ok jsing@
</content>
</entry>
<entry>
<title>!= -&gt; == that I broke while bikeshedding</title>
<updated>2015-09-11T13:22:39+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2015-09-11T13:22:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d13ab44c3b1d9663b972b8b6f698f56a9d151a96'/>
<id>urn:sha1:d13ab44c3b1d9663b972b8b6f698f56a9d151a96</id>
<content type='text'>
</content>
</entry>
<entry>
<title>add tls_peer functions for checking names and issuers of peer certificates.</title>
<updated>2015-09-11T12:56:55+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2015-09-11T12:56:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=27e5e00bb80457049b7e7613f43e8f1165402316'/>
<id>urn:sha1:27e5e00bb80457049b7e7613f43e8f1165402316</id>
<content type='text'>
ok jsing@
</content>
</entry>
<entry>
<title>Provide tls_peer_cert_hash() which returns a hash of the raw certificate</title>
<updated>2015-09-11T11:28:01+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2015-09-11T11:28:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=0dd7e6b53207a35f05ffb30e367e39644d20f096'/>
<id>urn:sha1:0dd7e6b53207a35f05ffb30e367e39644d20f096</id>
<content type='text'>
that was presented by the peer. The hash used is currently SHA256, however
since we prefix the result with the hash name, we can change this in the
future as the need arises.

The same output can be generated by using:

 h=$(openssl x509 -outform der -in mycert.crt | sha256)
 printf "SHA256:${h}\n"

ok beck@
</content>
</entry>
</feed>
