Skip to content

Commit 096bccf

Browse files
committed
Merge remote-tracking branch 'origin/pr/2450' into mbedtls-2.16
* origin/pr/2450: Fix #2370, minor typos and spelling mistakes
2 parents f580d43 + d5f4759 commit 096bccf

26 files changed

+53
-53
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ When backporting to these branches please observe the following rules:
5050

5151
2. All bug fixes that correct a defect that is also present in an LTS branch must be backported to that LTS branch. If a bug fix introduces a change to the API such as a new function, the fix should be reworked to avoid the API change. API changes without very strong justification are unlikely to be accepted.
5252

53-
3. If a contribution is a new feature or enhancement, no backporting is required. Exceptions to this may be addtional test cases or quality improvements such as changes to build or test scripts.
53+
3. If a contribution is a new feature or enhancement, no backporting is required. Exceptions to this may be additional test cases or quality improvements such as changes to build or test scripts.
5454

5555
It would be highly appreciated if contributions are backported to LTS branches in addition to the [development branch](https://github.com/ARMmbed/mbedtls/tree/development) by contributors.
5656

ChangeLog

+5-5
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Security
426426
1.2, that allowed a local attacker, able to execute code on the local
427427
machine as well as manipulate network packets, to partially recover the
428428
plaintext of messages under some conditions by using a cache attack
429-
targetting an internal MD/SHA buffer. With TLS or if
429+
targeting an internal MD/SHA buffer. With TLS or if
430430
mbedtls_ssl_conf_dtls_badmac_limit() was used, the attack only worked if
431431
the same secret (for example a HTTP Cookie) has been repeatedly sent over
432432
connections manipulated by the attacker. Connections using GCM or CCM
@@ -1312,7 +1312,7 @@ Bugfix
13121312
* Fix potential build failures related to the 'apidoc' target, introduced
13131313
in the previous patch release. Found by Robert Scheck. #390 #391
13141314
* Fix issue in Makefile that prevented building using armar. #386
1315-
* Fix memory leak that occured only when ECJPAKE was enabled and ECDHE and
1315+
* Fix memory leak that occurred only when ECJPAKE was enabled and ECDHE and
13161316
ECDSA was disabled in config.h . The leak didn't occur by default.
13171317
* Fix an issue that caused valid certificates to be rejected whenever an
13181318
expired or not yet valid certificate was parsed before a valid certificate
@@ -1554,7 +1554,7 @@ API Changes
15541554
You now need to link to all of them if you use TLS for example.
15551555
* All public identifiers moved to the mbedtls_* or MBEDTLS_* namespace.
15561556
Some names have been further changed to make them more consistent.
1557-
Migration helpers scripts/rename.pl and include/mbedlts/compat-1.3.h are
1557+
Migration helpers scripts/rename.pl and include/mbedtls/compat-1.3.h are
15581558
provided. Full list of renamings in scripts/data_files/rename-1.3-2.0.txt
15591559
* Renamings of fields inside structures, not covered by the previous list:
15601560
mbedtls_cipher_info_t.key_length -> key_bitlen
@@ -1609,7 +1609,7 @@ API Changes
16091609
* net_accept() gained new arguments for the size of the client_ip buffer.
16101610
* In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now
16111611
return void.
1612-
* ecdsa_write_signature() gained an addtional md_alg argument and
1612+
* ecdsa_write_signature() gained an additional md_alg argument and
16131613
ecdsa_write_signature_det() was deprecated.
16141614
* pk_sign() no longer accepts md_alg == POLARSSL_MD_NONE with ECDSA.
16151615
* Last argument of x509_crt_check_key_usage() and
@@ -3144,7 +3144,7 @@ XySSL ChangeLog
31443144
not swapped on PadLock; also fixed compilation on older versions
31453145
of gcc (bug reported by David Barrett)
31463146
* Correctly handle the case in padlock_xcryptcbc() when input or
3147-
ouput data is non-aligned by falling back to the software
3147+
output data is non-aligned by falling back to the software
31483148
implementation, as VIA Nehemiah cannot handle non-aligned buffers
31493149
* Fixed a memory leak in x509parse_crt() which was reported by Greg
31503150
Robson-Garth; some x509write.c fixes by Pascal Vizeli, thanks to

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ In order to build for a Windows platform, you should use `WINDOWS_BUILD=1` if th
4747

4848
Setting the variable `SHARED` in your environment will build shared libraries in addition to the static libraries. Setting `DEBUG` gives you a debug build. You can override `CFLAGS` and `LDFLAGS` by setting them in your environment or on the make command line; compiler warning options may be overridden separately using `WARNING_CFLAGS`. Some directory-specific options (for example, `-I` directives) are still preserved.
4949

50-
Please note that setting `CFLAGS` overrides its default value of `-O2` and setting `WARNING_CFLAGS` overrides its default value (starting with `-Wall -W`), so if you just want to add some warning options to the default ones, you can do so by setting `CFLAGS=-O2 -Werror` for example. Setting `WARNING_CFLAGS` is useful when you want to get rid of its default content (for example because your compiler doesn't accept `-Wall` as an option). Directory-specific options cannot be overriden from the command line.
50+
Please note that setting `CFLAGS` overrides its default value of `-O2` and setting `WARNING_CFLAGS` overrides its default value (starting with `-Wall -W`), so if you just want to add some warning options to the default ones, you can do so by setting `CFLAGS=-O2 -Werror` for example. Setting `WARNING_CFLAGS` is useful when you want to get rid of its default content (for example because your compiler doesn't accept `-Wall` as an option). Directory-specific options cannot be overridden from the command line.
5151

5252
Depending on your platform, you might run into some issues. Please check the Makefiles in `library/`, `programs/` and `tests/` for options to manually add or remove for specific platforms. You can also check [the Mbed TLS Knowledge Base](https://tls.mbed.org/kb) for articles on your platform or issue.
5353

include/mbedtls/check_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@
691691
/*
692692
* Avoid warning from -pedantic. This is a convenient place for this
693693
* workaround since this is included by every single file before the
694-
* #if defined(MBEDTLS_xxx_C) that results in emtpy translation units.
694+
* #if defined(MBEDTLS_xxx_C) that results in empty translation units.
695695
*/
696696
typedef int mbedtls_iso_c_forbids_empty_translation_units;
697697

include/mbedtls/config.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
*
140140
* System has time.h, time(), and an implementation for
141141
* mbedtls_platform_gmtime_r() (see below).
142-
* The time needs to be correct (not necesarily very accurate, but at least
142+
* The time needs to be correct (not necessarily very accurate, but at least
143143
* the date should be correct). This is used to verify the validity period of
144144
* X.509 certificates.
145145
*
@@ -401,7 +401,7 @@
401401
* \note Because of a signature change, the core AES encryption and decryption routines are
402402
* currently named mbedtls_aes_internal_encrypt and mbedtls_aes_internal_decrypt,
403403
* respectively. When setting up alternative implementations, these functions should
404-
* be overriden, but the wrapper functions mbedtls_aes_decrypt and mbedtls_aes_encrypt
404+
* be overridden, but the wrapper functions mbedtls_aes_decrypt and mbedtls_aes_encrypt
405405
* must stay untouched.
406406
*
407407
* \note If you use the AES_xxx_ALT macros, then is is recommended to also set
@@ -1558,7 +1558,7 @@
15581558
* \def MBEDTLS_SSL_SESSION_TICKETS
15591559
*
15601560
* Enable support for RFC 5077 session tickets in SSL.
1561-
* Client-side, provides full support for session tickets (maintainance of a
1561+
* Client-side, provides full support for session tickets (maintenance of a
15621562
* session store remains the responsibility of the application, though).
15631563
* Server-side, you also need to provide callbacks for writing and parsing
15641564
* tickets, including authenticated encryption and key management. Example
@@ -1724,7 +1724,7 @@
17241724
*
17251725
* \warning TLS-level compression MAY REDUCE SECURITY! See for example the
17261726
* CRIME attack. Before enabling this option, you should examine with care if
1727-
* CRIME or similar exploits may be a applicable to your use case.
1727+
* CRIME or similar exploits may be applicable to your use case.
17281728
*
17291729
* \note Currently compression can't be used with DTLS.
17301730
*
@@ -3036,7 +3036,7 @@
30363036
//#define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
30373037
//#define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */
30383038
//#define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */
3039-
/* Note: your snprintf must correclty zero-terminate the buffer! */
3039+
/* Note: your snprintf must correctly zero-terminate the buffer! */
30403040
//#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */
30413041
//#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */
30423042
//#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */
@@ -3053,7 +3053,7 @@
30533053
//#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */
30543054
//#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */
30553055
//#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */
3056-
/* Note: your snprintf must correclty zero-terminate the buffer! */
3056+
/* Note: your snprintf must correctly zero-terminate the buffer! */
30573057
//#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */
30583058
//#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */
30593059
//#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */

include/mbedtls/hmac_drbg.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ extern "C" {
8282
*/
8383
typedef struct mbedtls_hmac_drbg_context
8484
{
85-
/* Working state: the key K is not stored explicitely,
85+
/* Working state: the key K is not stored explicitly,
8686
* but is implied by the HMAC context */
8787
mbedtls_md_context_t md_ctx; /*!< HMAC context (inc. K) */
8888
unsigned char V[MBEDTLS_MD_MAX_SIZE]; /*!< V in the spec */

include/mbedtls/rsa.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ mbedtls_rsa_context;
150150
* \note The choice of padding mode is strictly enforced for private key
151151
* operations, since there might be security concerns in
152152
* mixing padding modes. For public key operations it is
153-
* a default value, which can be overriden by calling specific
153+
* a default value, which can be overridden by calling specific
154154
* \c rsa_rsaes_xxx or \c rsa_rsassa_xxx functions.
155155
*
156156
* \note The hash selected in \p hash_id is always used for OEAP
157157
* encryption. For PSS signatures, it is always used for
158-
* making signatures, but can be overriden for verifying them.
159-
* If set to #MBEDTLS_MD_NONE, it is always overriden.
158+
* making signatures, but can be overridden for verifying them.
159+
* If set to #MBEDTLS_MD_NONE, it is always overridden.
160160
*
161161
* \param ctx The RSA context to initialize. This must not be \c NULL.
162162
* \param padding The padding mode to use. This must be either

include/mbedtls/ssl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2033,7 +2033,7 @@ void mbedtls_ssl_conf_ca_chain( mbedtls_ssl_config *conf,
20332033
* provision more than one cert/key pair (eg one ECDSA, one
20342034
* RSA with SHA-256, one RSA with SHA-1). An adequate
20352035
* certificate will be selected according to the client's
2036-
* advertised capabilities. In case mutliple certificates are
2036+
* advertised capabilities. In case multiple certificates are
20372037
* adequate, preference is given to the one set by the first
20382038
* call to this function, then second, etc.
20392039
*
@@ -3206,7 +3206,7 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl );
32063206
* mbedtls_ssl_config_defaults() or mbedtls_ssl_config_free().
32073207
*
32083208
* \note You need to call mbedtls_ssl_config_defaults() unless you
3209-
* manually set all of the relevent fields yourself.
3209+
* manually set all of the relevant fields yourself.
32103210
*
32113211
* \param conf SSL configuration context
32123212
*/

include/mbedtls/ssl_ticket.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ int mbedtls_ssl_ticket_setup( mbedtls_ssl_ticket_context *ctx,
117117
/**
118118
* \brief Implementation of the ticket write callback
119119
*
120-
* \note See \c mbedlts_ssl_ticket_write_t for description
120+
* \note See \c mbedtls_ssl_ticket_write_t for description
121121
*/
122122
mbedtls_ssl_ticket_write_t mbedtls_ssl_ticket_write;
123123

124124
/**
125125
* \brief Implementation of the ticket parse callback
126126
*
127-
* \note See \c mbedlts_ssl_ticket_parse_t for description
127+
* \note See \c mbedtls_ssl_ticket_parse_t for description
128128
*/
129129
mbedtls_ssl_ticket_parse_t mbedtls_ssl_ticket_parse;
130130

include/mbedtls/x509.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
#define MBEDTLS_ERR_X509_ALLOC_FAILED -0x2880 /**< Allocation of memory failed. */
7878
#define MBEDTLS_ERR_X509_FILE_IO_ERROR -0x2900 /**< Read/write of file failed. */
7979
#define MBEDTLS_ERR_X509_BUFFER_TOO_SMALL -0x2980 /**< Destination buffer is too small. */
80-
#define MBEDTLS_ERR_X509_FATAL_ERROR -0x3000 /**< A fatal error occured, eg the chain is too long or the vrfy callback failed. */
80+
#define MBEDTLS_ERR_X509_FATAL_ERROR -0x3000 /**< A fatal error occurred, eg the chain is too long or the vrfy callback failed. */
8181
/* \} name */
8282

8383
/**
@@ -250,7 +250,7 @@ int mbedtls_x509_serial_gets( char *buf, size_t size, const mbedtls_x509_buf *se
250250
*
251251
* \param to mbedtls_x509_time to check
252252
*
253-
* \return 1 if the given time is in the past or an error occured,
253+
* \return 1 if the given time is in the past or an error occurred,
254254
* 0 otherwise.
255255
*/
256256
int mbedtls_x509_time_is_past( const mbedtls_x509_time *to );
@@ -264,7 +264,7 @@ int mbedtls_x509_time_is_past( const mbedtls_x509_time *to );
264264
*
265265
* \param from mbedtls_x509_time to check
266266
*
267-
* \return 1 if the given time is in the future or an error occured,
267+
* \return 1 if the given time is in the future or an error occurred,
268268
* 0 otherwise.
269269
*/
270270
int mbedtls_x509_time_is_future( const mbedtls_x509_time *from );

include/mbedtls/x509_crl.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain,
111111
/**
112112
* \brief Parse one or more CRLs and append them to the chained list
113113
*
114-
* \note Mutliple CRLs are accepted only if using PEM format
114+
* \note Multiple CRLs are accepted only if using PEM format
115115
*
116116
* \param chain points to the start of the chain
117117
* \param buf buffer holding the CRL data in PEM or DER format
@@ -126,7 +126,7 @@ int mbedtls_x509_crl_parse( mbedtls_x509_crl *chain, const unsigned char *buf, s
126126
/**
127127
* \brief Load one or more CRLs and append them to the chained list
128128
*
129-
* \note Mutliple CRLs are accepted only if using PEM format
129+
* \note Multiple CRLs are accepted only if using PEM format
130130
*
131131
* \param chain points to the start of the chain
132132
* \param path filename to read the CRLs from (in PEM or DER encoding)

library/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SOEXT_TLS=so.12
3939
SOEXT_X509=so.0
4040
SOEXT_CRYPTO=so.3
4141

42-
# Set AR_DASH= (empty string) to use an ar implentation that does not accept
42+
# Set AR_DASH= (empty string) to use an ar implementation that does not accept
4343
# the - prefix for command line options (e.g. llvm-ar)
4444
AR_DASH ?= -
4545

library/ecjpake.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ static const unsigned char ecjpake_test_pms[] = {
951951
0xb4, 0x38, 0xf7, 0x19, 0xd3, 0xc4, 0xf3, 0x51
952952
};
953953

954-
/* Load my private keys and generate the correponding public keys */
954+
/* Load my private keys and generate the corresponding public keys */
955955
static int ecjpake_test_load( mbedtls_ecjpake_context *ctx,
956956
const unsigned char *xm1, size_t len1,
957957
const unsigned char *xm2, size_t len2 )

library/error.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ void mbedtls_strerror( int ret, char *buf, size_t buflen )
567567
if( use_ret == -(MBEDTLS_ERR_X509_BUFFER_TOO_SMALL) )
568568
mbedtls_snprintf( buf, buflen, "X509 - Destination buffer is too small" );
569569
if( use_ret == -(MBEDTLS_ERR_X509_FATAL_ERROR) )
570-
mbedtls_snprintf( buf, buflen, "X509 - A fatal error occured, eg the chain is too long or the vrfy callback failed" );
570+
mbedtls_snprintf( buf, buflen, "X509 - A fatal error occurred, eg the chain is too long or the vrfy callback failed" );
571571
#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */
572572
// END generated code
573573

library/ssl_srv.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ static int ssl_parse_client_hello( mbedtls_ssl_context *ssl )
14491449
*/
14501450

14511451
/*
1452-
* Minimal length (with everything empty and extensions ommitted) is
1452+
* Minimal length (with everything empty and extensions omitted) is
14531453
* 2 + 32 + 1 + 2 + 1 = 38 bytes. Check that first, so that we can
14541454
* read at least up to session id length without worrying.
14551455
*/

library/ssl_tls.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2606,7 +2606,7 @@ int mbedtls_ssl_fetch_input( mbedtls_ssl_context *ssl, size_t nb_want )
26062606
}
26072607

26082608
/*
2609-
* A record can't be split accross datagrams. If we need to read but
2609+
* A record can't be split across datagrams. If we need to read but
26102610
* are not at the beginning of a new record, the caller did something
26112611
* wrong.
26122612
*/

library/x509.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int mbedtls_x509_get_alg_null( unsigned char **p, const unsigned char *end,
123123
}
124124

125125
/*
126-
* Parse an algorithm identifier with (optional) paramaters
126+
* Parse an algorithm identifier with (optional) parameters
127127
*/
128128
int mbedtls_x509_get_alg( unsigned char **p, const unsigned char *end,
129129
mbedtls_x509_buf *alg, mbedtls_x509_buf *params )

library/x509_crt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2236,7 +2236,7 @@ static int x509_crt_check_ee_locally_trusted(
22362236
* Tests for (aspects of) this function should include at least:
22372237
* - trusted EE
22382238
* - EE -> trusted root
2239-
* - EE -> intermedate CA -> trusted root
2239+
* - EE -> intermediate CA -> trusted root
22402240
* - if relevant: EE untrusted
22412241
* - if relevant: EE -> intermediate, untrusted
22422242
* with the aspect under test checked at each relevant level (EE, int, root).

tests/compat.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ FAILED=0
2121
SKIPPED=0
2222
SRVMEM=0
2323

24-
# default commands, can be overriden by the environment
24+
# default commands, can be overridden by the environment
2525
: ${M_SRV:=../programs/ssl/ssl_server2}
2626
: ${M_CLI:=../programs/ssl/ssl_client2}
2727
: ${OPENSSL_CMD:=openssl} # OPENSSL would conflict with the build system

tests/scripts/all.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pre_initialize_variables () {
120120
FORCE=0
121121
KEEP_GOING=0
122122

123-
# Default commands, can be overriden by the environment
123+
# Default commands, can be overridden by the environment
124124
: ${OPENSSL:="openssl"}
125125
: ${OPENSSL_LEGACY:="$OPENSSL"}
126126
: ${OPENSSL_NEXT:="$OPENSSL"}

tests/scripts/test_zeroize.gdb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# seem to be a mechanism to reliably check whether the zeroize calls are being
1818
# eliminated by compiler optimizations from within the compiled program. The
1919
# problem is that a compiler would typically remove what it considers to be
20-
# "unecessary" assignments as part of redundant code elimination. To identify
20+
# "unnecessary" assignments as part of redundant code elimination. To identify
2121
# such code, the compilar will create some form dependency graph between
2222
# reads and writes to variables (among other situations). It will then use this
2323
# data structure to remove redundant code that does not have an impact on the

0 commit comments

Comments
 (0)