Skip to content

Commit 0020b90

Browse files
committed
Clarify documentation of ssl_set_own_cert()
fixes Mbed-TLS#507
1 parent c774e32 commit 0020b90

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

ChangeLog

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Bugfix
77
invalidated keys of a lifetime of less than a 1s. Fixes #1968.
88
* Fix failure in hmac_drbg in the benchmark sample application, when
99
MBEDTLS_THREADING_C is defined. Found by TrinityTonic, #1095
10+
* Clarify documentation of mbedtls_ssl_set_own_cert() regarding the absence
11+
of check for certificate/key matching. Reported by Attila Molnar, #507.
1012

1113
Changes
1214
* Add tests for session resumption in DTLS.

include/mbedtls/ssl.h

+8
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,14 @@ void mbedtls_ssl_conf_ca_chain( mbedtls_ssl_config *conf,
20432043
* whether it matches those preferences - the server can then
20442044
* decide what it wants to do with it.
20452045
*
2046+
* \note The provided \p pk_key needs to match the public key in the
2047+
* first certificate in \p own_cert, or all handshakes using
2048+
* that certificate will fail. It is your reponsibility
2049+
* to ensure that; this function will not perform any check.
2050+
* You may use mbedtls_pk_check_pair() in order to perform
2051+
* this check yourself, but be aware that this function can
2052+
* be computationally expensive on some key types.
2053+
*
20462054
* \param conf SSL configuration
20472055
* \param own_cert own public certificate chain
20482056
* \param pk_key own private key

0 commit comments

Comments
 (0)