diff --git a/apps/ca.c b/apps/ca.c index 102ff87d6fe1c712668ba7406f8ddca145dc96de..289fd48e1791876cf078479794edf1e00ce353ac 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 d678e8e2579d5ed92575e80cd8f29e7c50fc1283..4c92a53f7540e49dbab4a07965e362da02ad69b3 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 960d4ebf02e0ee91da7f6fa443a896482570df4a..2608660d81b44c555a66e973bc9f1971579b29c2 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 265d54d807290cd114bfe071e85f3ba97f169a76..8f63b9aa994d55d84660b8231f070d11b1e22e0c 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 35afcb13e01583554df87d3d70f012c1f055b6b2..6f50bfd58690107da8d0f44670706ad42f46dc56 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 df59f469fd866b83f13d9df1126ecef3831d14de..46d9a5639bc0dad93171a0738c91ffd021db1bfe 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 4015cd26309f0db10ec67f433eb213b5d79cc68b..0eb41c9574b36d6587eb29e4de183f5d97cd257d 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 045a74c113e61a7a12767f156f3e02df050cf5cb..0c40905edbbeba109bea4a0584afe084688f1913 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 d77d4935e9acc29a3b94966383d2c4e091614052..b4d85d958c5f1cb430a970c14631e01dc8d4c8a6 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 2aae1ca79afe26eae516e8f33ebe2ea27befcf9d..d17969245475e55ae58f66537bfe2115ca9d71a3 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 b8127962c5ffb98646c919f870640b08ea893f23..6aa21f2a9202ee2b801ccdcd38dc9a6f467335d7 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 7349273c384504988902291fc28dfd1c5e4af1d6..a2f8de5a951fd0a7f1de909a4e6b1dc645cc41af 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 8e027b908a7ee12f752969626f2126879ca18aca..3e3b58992673743996882dbe8b4306f56530825b 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 5022ce0f6ed54fc1e88036fbc54927a7f566e8b6..e24f0fb2cfc3e092111fe8f9bcbb9b62b6de2a71 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 1f74c9592576701d87518955d705d276807bcf36..4ee0bae9b90b09f7448bdfe11f815bc857a067d6 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 6d1cd91e9bb065ea7e1ef608c52333b7cad1d5f2..96870ce2de9ea34f95e0b74cee84c5d10fa8d98d 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 48c4eb3677354cd82170e4e6d2925dd331a9e476..0975e2b779c3a0fd7ac077ed54429f891755f10d 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.