[openssl-commits] [openssl] master update
kaduk at mit.edu
kaduk at mit.edu
Tue Nov 7 18:15:47 UTC 2017
The branch master has been updated
via f4411faac4a5dff7d3ded58d8a17664a6996b0e5 (commit)
via f479eab2271c06d73d2e473ce47b0fc6ab742cef (commit)
from 89635075d84353fc0c3d44a82fd0903ccd4ab24a (commit)
- Log -----------------------------------------------------------------
commit f4411faac4a5dff7d3ded58d8a17664a6996b0e5
Author: FdaSilvaYY <fdasilvayy at gmail.com>
Date: Sun Sep 10 12:06:27 2017 +0200
Various typo
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Ben Kaduk <kaduk at mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4457)
commit f479eab2271c06d73d2e473ce47b0fc6ab742cef
Author: FdaSilvaYY <fdasilvayy at gmail.com>
Date: Sat Aug 26 17:56:44 2017 +0200
style : fix some if(...
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Ben Kaduk <kaduk at mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4457)
-----------------------------------------------------------------------
Summary of changes:
apps/s_client.c | 2 +-
apps/s_server.c | 2 +-
crypto/bio/b_print.c | 30 +++++++++++++++---------------
crypto/engine/eng_devcrypto.c | 4 ++--
crypto/ocsp/ocsp_srv.c | 2 +-
doc/man3/ASN1_TIME_set.pod | 2 +-
doc/man3/SSL_read_early_data.pod | 2 +-
doc/man3/UI_new.pod | 2 +-
engines/e_dasync.c | 4 ++--
ssl/record/rec_layer_s3.c | 4 ++--
ssl/t1_enc.c | 2 +-
test/testutil.h | 2 +-
12 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/apps/s_client.c b/apps/s_client.c
index d4fb1a8..d2aa01d 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -198,7 +198,7 @@ static int psk_use_session_cb(SSL *s, const EVP_MD *md,
if (key_len == EVP_MD_size(EVP_sha256()))
cipher = SSL_CIPHER_find(s, tls13_aes128gcmsha256_id);
- else if(key_len == EVP_MD_size(EVP_sha384()))
+ else if (key_len == EVP_MD_size(EVP_sha384()))
cipher = SSL_CIPHER_find(s, tls13_aes256gcmsha384_id);
if (cipher == NULL) {
diff --git a/apps/s_server.c b/apps/s_server.c
index 311f4a2..86fed6f 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -208,7 +208,7 @@ static int psk_find_session_cb(SSL *ssl, const unsigned char *identity,
if (key_len == EVP_MD_size(EVP_sha256()))
cipher = SSL_CIPHER_find(ssl, tls13_aes128gcmsha256_id);
- else if(key_len == EVP_MD_size(EVP_sha384()))
+ else if (key_len == EVP_MD_size(EVP_sha384()))
cipher = SSL_CIPHER_find(ssl, tls13_aes256gcmsha384_id);
if (cipher == NULL) {
diff --git a/crypto/bio/b_print.c b/crypto/bio/b_print.c
index 056de86..2180fd5 100644
--- a/crypto/bio/b_print.c
+++ b/crypto/bio/b_print.c
@@ -111,7 +111,7 @@ _dopr(char **sbuffer,
if (ch == '%')
state = DP_S_FLAGS;
else
- if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
+ if (!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
return 0;
ch = *format++;
break;
@@ -293,8 +293,8 @@ _dopr(char **sbuffer,
return 0;
break;
case 'c':
- if(!doapr_outch(sbuffer, buffer, &currlen, maxlen,
- va_arg(args, int)))
+ if (!doapr_outch(sbuffer, buffer, &currlen, maxlen,
+ va_arg(args, int)))
return 0;
break;
case 's':
@@ -323,7 +323,7 @@ _dopr(char **sbuffer,
}
break;
case '%':
- if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
+ if (!doapr_outch(sbuffer, buffer, &currlen, maxlen, ch))
return 0;
break;
case 'w':
@@ -354,7 +354,7 @@ _dopr(char **sbuffer,
if (*truncated)
currlen = *maxlen - 1;
}
- if(!doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0'))
+ if (!doapr_outch(sbuffer, buffer, &currlen, maxlen, '\0'))
return 0;
*retlen = currlen - 1;
return 1;
@@ -392,19 +392,19 @@ fmtstr(char **sbuffer,
padlen = -padlen;
while ((padlen > 0) && (max < 0 || cnt < max)) {
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
return 0;
--padlen;
++cnt;
}
while (strln > 0 && (max < 0 || cnt < max)) {
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *value++))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, *value++))
return 0;
--strln;
++cnt;
}
while ((padlen < 0) && (max < 0 || cnt < max)) {
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
return 0;
++padlen;
++cnt;
@@ -472,19 +472,19 @@ fmtint(char **sbuffer,
/* spaces */
while (spadlen > 0) {
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, ' '))
return 0;
--spadlen;
}
/* sign */
if (signvalue)
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, signvalue))
return 0;
/* prefix */
while (*prefix) {
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, *prefix))
return 0;
prefix++;
}
@@ -492,7 +492,7 @@ fmtint(char **sbuffer,
/* zeros */
if (zpadlen > 0) {
while (zpadlen > 0) {
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen, '0'))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen, '0'))
return 0;
--zpadlen;
}
@@ -758,8 +758,8 @@ fmtfp(char **sbuffer,
return 0;
while (fplace > 0) {
- if(!doapr_outch(sbuffer, buffer, currlen, maxlen,
- fconvert[--fplace]))
+ if (!doapr_outch(sbuffer, buffer, currlen, maxlen,
+ fconvert[--fplace]))
return 0;
}
}
@@ -913,7 +913,7 @@ int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
size_t retlen;
int truncated;
- if(!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args))
+ if (!_dopr(&buf, NULL, &n, &retlen, &truncated, format, args))
return -1;
if (truncated)
diff --git a/crypto/engine/eng_devcrypto.c b/crypto/engine/eng_devcrypto.c
index f2196b4..235e84b 100644
--- a/crypto/engine/eng_devcrypto.c
+++ b/crypto/engine/eng_devcrypto.c
@@ -226,7 +226,7 @@ static int cipher_cleanup(EVP_CIPHER_CTX *ctx)
/*
* Keep a table of known nids and associated methods.
- * Note that known_cipher_nids[] isn't necessarely indexed the same way as
+ * Note that known_cipher_nids[] isn't necessarily indexed the same way as
* cipher_data[] above, which known_cipher_methods[] is.
*/
static int known_cipher_nids[OSSL_NELEM(cipher_data)];
@@ -495,7 +495,7 @@ static int digest_cleanup(EVP_MD_CTX *ctx)
/*
* Keep a table of known nids and associated methods.
- * Note that known_digest_nids[] isn't necessarely indexed the same way as
+ * Note that known_digest_nids[] isn't necessarily indexed the same way as
* digest_data[] above, which known_digest_methods[] is.
*/
static int known_digest_nids[OSSL_NELEM(digest_data)];
diff --git a/crypto/ocsp/ocsp_srv.c b/crypto/ocsp/ocsp_srv.c
index 46a4bf7..51b27bd 100644
--- a/crypto/ocsp/ocsp_srv.c
+++ b/crypto/ocsp/ocsp_srv.c
@@ -265,7 +265,7 @@ int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert)
return (ASN1_STRING_length(respid->value.byKey) == SHA_DIGEST_LENGTH)
&& (memcmp(ASN1_STRING_get0_data(respid->value.byKey), md,
SHA_DIGEST_LENGTH) == 0);
- } else if(respid->type == V_OCSP_RESPID_NAME) {
+ } else if (respid->type == V_OCSP_RESPID_NAME) {
if (respid->value.byName == NULL)
return 0;
diff --git a/doc/man3/ASN1_TIME_set.pod b/doc/man3/ASN1_TIME_set.pod
index 1bb5672..d45cfe6 100644
--- a/doc/man3/ASN1_TIME_set.pod
+++ b/doc/man3/ASN1_TIME_set.pod
@@ -224,7 +224,7 @@ if the time is successfully printed out and 0 if an error occurred (I/O error or
invalid time format).
ASN1_TIME_to_tm() returns 1 if the time is successfully parsed and 0 if an
-error occured (invalid time format).
+error occurred (invalid time format).
ASN1_TIME_diff() returns 1 for success and 0 for failure. It can fail if the
passed-in time structure has invalid syntax, for example.
diff --git a/doc/man3/SSL_read_early_data.pod b/doc/man3/SSL_read_early_data.pod
index 1073684..da95a2a 100644
--- a/doc/man3/SSL_read_early_data.pod
+++ b/doc/man3/SSL_read_early_data.pod
@@ -115,7 +115,7 @@ SSL_read_early_data() may return 3 possible values:
=item SSL_READ_EARLY_DATA_ERROR
-This indicates an IO or some other error occured. This should be treated in the
+This indicates an IO or some other error occurred. This should be treated in the
same way as a 0 return value from L<SSL_read_ex(3)>.
=item SSL_READ_EARLY_DATA_SUCCESS
diff --git a/doc/man3/UI_new.pod b/doc/man3/UI_new.pod
index 39b24da..3f622ec 100644
--- a/doc/man3/UI_new.pod
+++ b/doc/man3/UI_new.pod
@@ -102,7 +102,7 @@ this UI, it should be freed using UI_free().
UI_new_method() creates a new UI using the given UI method. When done with
this UI, it should be freed using UI_free().
-UI_OpenSSL() returns the built-in UI method (note: not necessarely the
+UI_OpenSSL() returns the built-in UI method (note: not necessarily the
default one, since the default can be changed. See further on). This
method is the most machine/OS dependent part of OpenSSL and normally
generates the most problems when porting.
diff --git a/engines/e_dasync.c b/engines/e_dasync.c
index 9211ab7..6fc7a7d 100644
--- a/engines/e_dasync.c
+++ b/engines/e_dasync.c
@@ -437,8 +437,8 @@ static void dummy_pause_job(void) {
#endif
*writefd = pipefds[1];
- if(!ASYNC_WAIT_CTX_set_wait_fd(waitctx, engine_dasync_id, pipefds[0],
- writefd, wait_cleanup)) {
+ if (!ASYNC_WAIT_CTX_set_wait_fd(waitctx, engine_dasync_id, pipefds[0],
+ writefd, wait_cleanup)) {
wait_cleanup(waitctx, engine_dasync_id, pipefds[0], writefd);
return;
}
diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index d10b91b..c1101a6 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -920,8 +920,8 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
* This will be at most one cipher block or the tag length if using
* AEAD. SSL_RT_MAX_CIPHER_BLOCK_SIZE covers either case.
*/
- if(!WPACKET_reserve_bytes(thispkt, SSL_RT_MAX_CIPHER_BLOCK_SIZE,
- NULL)
+ if (!WPACKET_reserve_bytes(thispkt, SSL_RT_MAX_CIPHER_BLOCK_SIZE,
+ NULL)
/*
* We also need next the amount of bytes written to this
* sub-packet
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 9839e1d..8fe2dfd 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -448,7 +448,7 @@ int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p,
*/
if (!ssl3_digest_cached_records(s, 1))
return 0;
- if(!ssl_handshake_hash(s, hash, sizeof(hash), &hashlen))
+ if (!ssl_handshake_hash(s, hash, sizeof(hash), &hashlen))
return 0;
#ifdef SSL_DEBUG
fprintf(stderr, "Handshake hashes:\n");
diff --git a/test/testutil.h b/test/testutil.h
index 006bfb3..8373bb8 100644
--- a/test/testutil.h
+++ b/test/testutil.h
@@ -282,7 +282,7 @@ void test_perror(const char *s);
* a default description that indicates the file and line number of the error.
*
* The following macros guarantee to evaluate each argument exactly once.
- * This allows constructs such as: if(!TEST_ptr(ptr = OPENSSL_malloc(..)))
+ * This allows constructs such as: if (!TEST_ptr(ptr = OPENSSL_malloc(..)))
* to produce better contextual output than:
* ptr = OPENSSL_malloc(..);
* if (!TEST_ptr(ptr))
More information about the openssl-commits
mailing list