Clarify that sigalg configuration does not impact TLS 1.0/1.1 I always have to double-check the code for which way we went on this. Change-Id: I090f16b832328a80c8e007de6775797a495e3b6d Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/76188 Commit-Queue: Bob Beck <bbe@google.com> Reviewed-by: Bob Beck <bbe@google.com> Auto-Submit: David Benjamin <davidben@google.com>
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 6a074b5..b9bf7ea 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h
@@ -1147,17 +1147,29 @@ OPENSSL_EXPORT int SSL_is_signature_algorithm_rsa_pss(uint16_t sigalg); // SSL_CTX_set_signing_algorithm_prefs configures |ctx| to use |prefs| as the -// preference list when signing with |ctx|'s private key. It returns one on -// success and zero on error. |prefs| should not include the internal-only value -// |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// preference list when signing with |ctx|'s private key in TLS 1.2 and up. It +// returns one on success and zero on error. |prefs| should not include the +// internal-only TLS 1.0 value |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// +// This setting is not used in TLS 1.0 and 1.1. Those protocols always sign a +// hardcoded algorithm (an MD5/SHA-1 concatenation for RSA, and SHA-1 for +// ECDSA). BoringSSL will use those algorithms if and only if those versions are +// used. To disable them, set the minimum version to TLS 1.2 (default) or +// higher. OPENSSL_EXPORT int SSL_CTX_set_signing_algorithm_prefs(SSL_CTX *ctx, const uint16_t *prefs, size_t num_prefs); // SSL_set_signing_algorithm_prefs configures |ssl| to use |prefs| as the -// preference list when signing with |ssl|'s private key. It returns one on -// success and zero on error. |prefs| should not include the internal-only value -// |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// preference list when signing with |ssl|'s private key in TLS 1.2 and up. It +// returns one on success and zero on error. |prefs| should not include the +// internal-only TLS 1.0 value |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// +// This setting is not used in TLS 1.0 and 1.1. Those protocols always sign a +// hardcoded algorithm (an MD5/SHA-1 concatenation for RSA, and SHA-1 for +// ECDSA). BoringSSL will use those algorithms if and only if those versions are +// used. To disable them, set the minimum version to TLS 1.2 (default) or +// higher. OPENSSL_EXPORT int SSL_set_signing_algorithm_prefs(SSL *ssl, const uint16_t *prefs, size_t num_prefs); @@ -2847,17 +2859,29 @@ OPENSSL_EXPORT int SSL_set1_verify_cert_store(SSL *ssl, X509_STORE *store); // SSL_CTX_set_verify_algorithm_prefs configures |ctx| to use |prefs| as the -// preference list when verifying signatures from the peer's long-term key. It -// returns one on zero on error. |prefs| should not include the internal-only -// value |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// preference list when verifying signatures from the peer's long-term key in +// TLS 1.2 and up. It returns one on zero on error. |prefs| should not include +// the internal-only TLS 1.0 value |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// +// This setting is not used in TLS 1.0 and 1.1. Those protocols always sign a +// hardcoded algorithm (an MD5/SHA-1 concatenation for RSA, and SHA-1 for +// ECDSA). BoringSSL will accept those algorithms if and only if those versions +// are used. To disable them, set the minimum version to TLS 1.2 (default) or +// higher. OPENSSL_EXPORT int SSL_CTX_set_verify_algorithm_prefs(SSL_CTX *ctx, const uint16_t *prefs, size_t num_prefs); // SSL_set_verify_algorithm_prefs configures |ssl| to use |prefs| as the -// preference list when verifying signatures from the peer's long-term key. It -// returns one on zero on error. |prefs| should not include the internal-only -// value |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// preference list when verifying signatures from the peer's long-term key in +// TLS 1.2 and up. It returns one on zero on error. |prefs| should not include +// the internal-only TLS 1.0 value |SSL_SIGN_RSA_PKCS1_MD5_SHA1|. +// +// This setting is not used in TLS 1.0 and 1.1. Those protocols always sign a +// hardcoded algorithm (an MD5/SHA-1 concatenation for RSA, and SHA-1 for +// ECDSA). BoringSSL will accept those algorithms if and only if those versions +// are used. To disable them, set the minimum version to TLS 1.2 (default) or +// higher. OPENSSL_EXPORT int SSL_set_verify_algorithm_prefs(SSL *ssl, const uint16_t *prefs, size_t num_prefs);