Skip to content

Commit 040ef1e

Browse files
committed
Comment the first lines get_server_certificate()
See #2707 (comment)
1 parent 5359bef commit 040ef1e

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

testssl.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8190,6 +8190,17 @@ get_server_certificate() {
81908190
local -r a_gost="00,80, 00,81, 00,82, 00,83"
81918191
local using_sockets=true
81928192

8193+
# The caller indicates what type of certificate to find (e.g., RSA, DSA, ECC, DH) and get_server_certificate() is supposed to request
8194+
# just that type of certificate. This is done in order to obtain all of a server's certificates, if it has more than one.
8195+
# For TLS 1.2 and earlier, this is done by specifying in the ClientHello only cipher suites that use the specified type of certificate.
8196+
# The variables a_rsa, e_rsa, a_dss, etc. indicate which cipher suites to use depending on what type of certificate is to be asked for.
8197+
# For TLS 1.3, the way to indicate what type of certificate the server should use is through the signature_algorithms/-cert extension.
8198+
# So, for TLS 1.3 connections, the -sigalgs option is used with $OPENSSL and an appropriate signature_algorithms (0x0d) extension
8199+
# is provided to tls_sockets().
8200+
# The return 1 if $1 is neither tls_1_3_RSA nor tls_1_3_ECDSA is unnecessary. That would only happen if there were a bug in the
8201+
# code. For example, if someone added another certificate type (e.g., ML-DSA) to run_server_defaults(), but forgot to add corresponding
8202+
# code to get_server_certificate().
8203+
81938204
"$SSL_NATIVE" && using_sockets=false
81948205

81958206
CERTIFICATE_LIST_ORDERING_PROBLEM=false

0 commit comments

Comments
 (0)