From bd91e3c870402c4b10909c47082daece473d22ef Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Tue, 6 Jun 2017 23:35:43 +0800 Subject: [PATCH] Fix a bundle of trailing spaces in several files Signed-off-by: Paul Yang Reviewed-by: Kurt Roeckx Reviewed-by: Ben Kaduk Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3622) --- apps/ca.c | 2 +- apps/s_server.c | 2 +- apps/verify.c | 2 +- crypto/init.c | 2 +- crypto/x509v3/v3_alt.c | 2 +- demos/evp/aesgcm.c | 2 +- include/openssl/ssl.h | 2 +- ssl/record/rec_layer_s3.c | 2 +- ssl/statem/extensions.c | 2 +- test/destest.c | 2 +- test/lhash_test.c | 6 +++--- test/ossl_shim/include/openssl/base.h | 2 +- test/srptest.c | 6 +++--- test/ssl_test_ctx_test.c | 2 +- test/ssltestlib.c | 2 +- test/stack_test.c | 2 +- test/testutil.h | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/ca.c b/apps/ca.c index 102ff87d6f..289fd48e17 100644 --- a/apps/ca.c +++ b/apps/ca.c @@ -1573,7 +1573,7 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509, BIO_printf(bio_err, "The subject name appears to be ok, checking data base for clashes\n"); - /* + /* * Build the correct Subject if no e-mail is wanted in the subject. * And add it later on because of the method extensions are added (altName) */ diff --git a/apps/s_server.c b/apps/s_server.c index d678e8e257..4c92a53f75 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -717,7 +717,7 @@ typedef enum OPTION_choice { OPT_CRLF, OPT_QUIET, OPT_BRIEF, OPT_NO_DHE, OPT_NO_RESUME_EPHEMERAL, OPT_PSK_IDENTITY, OPT_PSK_HINT, OPT_PSK, OPT_SRPVFILE, OPT_SRPUSERSEED, OPT_REV, OPT_WWW, OPT_UPPER_WWW, OPT_HTTP, OPT_ASYNC, - OPT_SSL_CONFIG, + OPT_SSL_CONFIG, OPT_MAX_SEND_FRAG, OPT_SPLIT_SEND_FRAG, OPT_MAX_PIPELINES, OPT_READ_BUF, OPT_SSL3, OPT_TLS1_3, OPT_TLS1_2, OPT_TLS1_1, OPT_TLS1, OPT_DTLS, OPT_DTLS1, OPT_DTLS1_2, OPT_SCTP, OPT_TIMEOUT, OPT_MTU, OPT_LISTEN, diff --git a/apps/verify.c b/apps/verify.c index 960d4ebf02..2608660d81 100644 --- a/apps/verify.c +++ b/apps/verify.c @@ -27,7 +27,7 @@ typedef enum OPTION_choice { OPT_ERR = -1, OPT_EOF = 0, OPT_HELP, OPT_ENGINE, OPT_CAPATH, OPT_CAFILE, OPT_NOCAPATH, OPT_NOCAFILE, OPT_UNTRUSTED, OPT_TRUSTED, OPT_CRLFILE, OPT_CRL_DOWNLOAD, OPT_SHOW_CHAIN, - OPT_V_ENUM, OPT_NAMEOPT, + OPT_V_ENUM, OPT_NAMEOPT, OPT_VERBOSE } OPTION_CHOICE; diff --git a/crypto/init.c b/crypto/init.c index 265d54d807..8f63b9aa99 100644 --- a/crypto/init.c +++ b/crypto/init.c @@ -145,7 +145,7 @@ DEFINE_RUN_ONCE_STATIC(ossl_init_load_crypto_strings) # endif ret = err_load_crypto_strings_int(); load_crypto_strings_inited = 1; -#endif +#endif return ret; } diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c index 35afcb13e0..6f50bfd586 100644 --- a/crypto/x509v3/v3_alt.c +++ b/crypto/x509v3/v3_alt.c @@ -317,7 +317,7 @@ static int copy_email(X509V3_CTX *ctx, GENERAL_NAMES *gens, int move_p) if (ctx != NULL && ctx->flags == CTX_TEST) return 1; - if (ctx == NULL + if (ctx == NULL || (ctx->subject_cert == NULL && ctx->subject_req == NULL)) { X509V3err(X509V3_F_COPY_EMAIL, X509V3_R_NO_SUBJECT_DETAILS); goto err; diff --git a/demos/evp/aesgcm.c b/demos/evp/aesgcm.c index df59f469fd..46d9a5639b 100644 --- a/demos/evp/aesgcm.c +++ b/demos/evp/aesgcm.c @@ -102,7 +102,7 @@ void aes_gcm_decrypt(void) printf("Plaintext:\n"); BIO_dump_fp(stdout, outbuf, outlen); /* Set expected tag value. */ - EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(gcm_tag), + EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_TAG, sizeof(gcm_tag), (void *)gcm_tag); /* Finalise: note get no output for GCM */ rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 4015cd2630..0eb41c9574 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -429,7 +429,7 @@ typedef int (*SSL_verify_cb)(int preverify_ok, X509_STORE_CTX *x509_ctx); # define SSL_OP_PKCS1_CHECK_1 0x0 /* Removed from OpenSSL 1.0.1. Was 0x10000000L */ # define SSL_OP_PKCS1_CHECK_2 0x0 -/* Removed from OpenSSL 1.1.0. Was 0x20000000L */ +/* Removed from OpenSSL 1.1.0. Was 0x20000000L */ # define SSL_OP_NETSCAPE_CA_DN_BUG 0x0 /* Removed from OpenSSL 1.1.0. Was 0x40000000L */ # define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x0 diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 045a74c113..0c40905edb 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -354,7 +354,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len, * promptly send beyond the end of the users buffer ... so we trap and * report the error in a way the user will notice */ - if ((len < s->rlayer.wnum) + if ((len < s->rlayer.wnum) || ((wb->left != 0) && (len < (s->rlayer.wnum + s->rlayer.wpend_tot)))) { SSLerr(SSL_F_SSL3_WRITE_BYTES, SSL_R_BAD_LENGTH); return -1; diff --git a/ssl/statem/extensions.c b/ssl/statem/extensions.c index d77d4935e9..b4d85d958c 100644 --- a/ssl/statem/extensions.c +++ b/ssl/statem/extensions.c @@ -91,7 +91,7 @@ typedef struct extensions_definition_st { /* * Definitions of all built-in extensions. NOTE: Changes in the number or order - * of these extensions should be mirrored with equivalent changes to the + * of these extensions should be mirrored with equivalent changes to the * indexes ( TLSEXT_IDX_* ) defined in ssl_locl.h. * Each extension has an initialiser, a client and * server side parser and a finaliser. The initialiser is called (if the diff --git a/test/destest.c b/test/destest.c index 2aae1ca79a..d179692454 100644 --- a/test/destest.c +++ b/test/destest.c @@ -297,7 +297,7 @@ static char *pt(const unsigned char *p, char buf[DATA_BUF_SIZE]) ret[16] = '\0'; return ret; } - + static int test_des_ecb(int i) { DES_key_schedule ks; diff --git a/test/lhash_test.c b/test/lhash_test.c index b8127962c5..6aa21f2a92 100644 --- a/test/lhash_test.c +++ b/test/lhash_test.c @@ -80,7 +80,7 @@ static int test_int_lhash(void) { 999, 1 }, { 37, 0 }, { 1, 0 }, - { 34, 1 } + { 34, 1 } }; const unsigned int n_dels = OSSL_NELEM(dels); LHASH_OF(int) *h = lh_int_new(&int_hash, &int_cmp); @@ -133,7 +133,7 @@ static int test_int_lhash(void) TEST_info("lhash int doall %d", i); goto end; } - + /* do_all_arg */ memset(int_found, 0, sizeof(int_found)); lh_int_doall_short(h, int_doall_arg, int_found); @@ -142,7 +142,7 @@ static int test_int_lhash(void) TEST_info("lhash int doall arg %d", i); goto end; } - + /* delete */ for (i = 0; i < n_dels; i++) { const int b = lh_int_delete(h, &dels[i].data) == NULL; diff --git a/test/ossl_shim/include/openssl/base.h b/test/ossl_shim/include/openssl/base.h index 7349273c38..a2f8de5a95 100644 --- a/test/ossl_shim/include/openssl/base.h +++ b/test/ossl_shim/include/openssl/base.h @@ -6,7 +6,7 @@ * are met: * * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. + * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in diff --git a/test/srptest.c b/test/srptest.c index 8e027b908a..3e3b589926 100644 --- a/test/srptest.c +++ b/test/srptest.c @@ -22,7 +22,7 @@ static void showbn(const char *name, const BIGNUM *bn) { BIO *b; const char *text; - + if (!TEST_ptr(b = BIO_new(BIO_s_mem()))) return; BIO_write(b, name, strlen(name)); @@ -53,7 +53,7 @@ static int run_srp(const char *username, const char *client_pass, unsigned char rand_tmp[RANDOM_SIZE]; /* use builtin 1024-bit params */ const SRP_gN *GN; - + if (!TEST_ptr(GN = SRP_get_default_gN("1024"))) return 0; @@ -158,7 +158,7 @@ static int run_srp_kat(void) BIGNUM *Kserver = NULL; /* use builtin 1024-bit params */ const SRP_gN *GN; - + if (!TEST_ptr(GN = SRP_get_default_gN("1024"))) goto err; BN_hex2bn(&s, "BEB25379D1A8581EB5A727673A2441EE"); diff --git a/test/ssl_test_ctx_test.c b/test/ssl_test_ctx_test.c index 5022ce0f6e..e24f0fb2cf 100644 --- a/test/ssl_test_ctx_test.c +++ b/test/ssl_test_ctx_test.c @@ -199,7 +199,7 @@ static const char *bad_configurations[] = { static int test_bad_configuration(int idx) { SSL_TEST_CTX *ctx; - + if (!TEST_ptr_null(ctx = SSL_TEST_CTX_create(conf, bad_configurations[idx]))) { SSL_TEST_CTX_free(ctx); diff --git a/test/ssltestlib.c b/test/ssltestlib.c index 1f74c95925..4ee0bae9b9 100644 --- a/test/ssltestlib.c +++ b/test/ssltestlib.c @@ -288,7 +288,7 @@ void bio_s_mempacket_test_free(void) static int mempacket_test_new(BIO *bio) { MEMPACKET_TEST_CTX *ctx; - + if (!TEST_ptr(ctx = OPENSSL_zalloc(sizeof(*ctx)))) return 0; if (!TEST_ptr(ctx->pkts = sk_MEMPACKET_new_null())) { diff --git a/test/stack_test.c b/test/stack_test.c index 6d1cd91e9b..96870ce2de 100644 --- a/test/stack_test.c +++ b/test/stack_test.c @@ -196,7 +196,7 @@ static int test_uchar_stack(void) sk_uchar_sort(r); /* pop */ - for (i = 0; i < n; i++) + for (i = 0; i < n; i++) if (!TEST_ptr_eq(sk_uchar_pop(s), v + i)) { TEST_info("uchar pop %d", i); goto end; diff --git a/test/testutil.h b/test/testutil.h index 48c4eb3677..0975e2b779 100644 --- a/test/testutil.h +++ b/test/testutil.h @@ -434,7 +434,7 @@ int test_end_file(STANZA *s); /* * Read a stanza from the test file. A stanza consists of a block - * of lines of the form + * of lines of the form * key = value * The block is terminated by EOF or a blank line. * Return 1 if found, 0 on EOF or error. -- 2.25.1