mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Clarify Comments and Fix Typos (#651)
Fixes many typos, and errors in comments. * Clarifies many comments * Grammar correction in config.pl help text * Removed comment about MBEDTLS_X509_EXT_NS_CERT_TYPE. * Comment typo fix (Dont => Don't) * Comment typo fix (assure => ensure) * Comment typo fix (byes => bytes) * Added citation for quoted standard * Comment typo fix (one complement => 1's complement) The is some debate about whether to prefer "one's complement", "ones' complement", or "1's complement". The more recent RFCs related to TLS (RFC 6347, RFC 4347, etc) use " 1's complement", so I followed that convention. * Added missing ")" in comment * Comment alignment * Incorrect comment after #endif
This commit is contained in:
committed by
Simon Butcher
parent
9e655d33f9
commit
2adecba01f
@ -3428,7 +3428,7 @@ static int ssl_handle_possible_reconnect( mbedtls_ssl_context *ssl )
|
||||
|
||||
if( ret == MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED )
|
||||
{
|
||||
/* Dont check write errors as we can't do anything here.
|
||||
/* Don't check write errors as we can't do anything here.
|
||||
* If the error is permanent we'll catch it later,
|
||||
* if it's not, then hopefully it'll work next time. */
|
||||
(void) ssl->f_send( ssl->p_bio, ssl->out_buf, len );
|
||||
@ -6006,8 +6006,9 @@ int mbedtls_ssl_conf_alpn_protocols( mbedtls_ssl_config *conf, const char **prot
|
||||
const char **p;
|
||||
|
||||
/*
|
||||
* "Empty strings MUST NOT be included and byte strings MUST NOT be
|
||||
* truncated". Check lengths now rather than later.
|
||||
* RFC 7301 3.1: "Empty strings MUST NOT be included and byte strings
|
||||
* MUST NOT be truncated."
|
||||
* We check lengths now rather than later.
|
||||
*/
|
||||
tot_len = 0;
|
||||
for( p = protos; *p != NULL; p++ )
|
||||
@ -7585,7 +7586,7 @@ int mbedtls_ssl_check_cert_usage( const mbedtls_x509_crt *cert,
|
||||
* and, for DTLS, to/from TLS equivalent.
|
||||
*
|
||||
* For TLS this is the identity.
|
||||
* For DTLS, use one complement (v -> 255 - v, and then map as follows:
|
||||
* For DTLS, use 1's complement (v -> 255 - v, and then map as follows:
|
||||
* 1.0 <-> 3.2 (DTLS 1.0 is based on TLS 1.1)
|
||||
* 1.x <-> 3.x+1 for x != 0 (DTLS 1.2 based on TLS 1.2)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user