提交 28b86f31 编写于 作者: F FdaSilvaYY 提交者: Matt Caswell

Fix some extra or missing whitespaces...

Reviewed-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1618)
上级 ec2a0e60
...@@ -294,7 +294,7 @@ typedef struct options_st { ...@@ -294,7 +294,7 @@ typedef struct options_st {
/* /*
* value type: - no value (also the value zero), n number, p positive * value type: - no value (also the value zero), n number, p positive
* number, u unsigned, l long, s string, < input file, > output file, * number, u unsigned, l long, s string, < input file, > output file,
* f any format, F der/pem format , E der/pem/engine format identifier. * f any format, F der/pem format, E der/pem/engine format identifier.
* l, n and u include zero; p does not. * l, n and u include zero; p does not.
*/ */
int valtype; int valtype;
......
...@@ -185,7 +185,7 @@ int ec_main(int argc, char **argv) ...@@ -185,7 +185,7 @@ int ec_main(int argc, char **argv)
} else if (informat == FORMAT_ENGINE) { } else if (informat == FORMAT_ENGINE) {
EVP_PKEY *pkey; EVP_PKEY *pkey;
if (pubin) if (pubin)
pkey = load_pubkey(infile, informat , 1, passin, e, "Public Key"); pkey = load_pubkey(infile, informat, 1, passin, e, "Public Key");
else else
pkey = load_key(infile, informat, 1, passin, e, "Private Key"); pkey = load_key(infile, informat, 1, passin, e, "Private Key");
if (pkey != NULL) { if (pkey != NULL) {
......
...@@ -106,7 +106,7 @@ int prime_main(int argc, char **argv) ...@@ -106,7 +106,7 @@ int prime_main(int argc, char **argv)
else else
r = BN_dec2bn(&bn, argv[0]); r = BN_dec2bn(&bn, argv[0]);
if(!r) { if (!r) {
BIO_printf(bio_err, "Failed to process value (%s)\n", argv[0]); BIO_printf(bio_err, "Failed to process value (%s)\n", argv[0]);
goto end; goto end;
} }
......
...@@ -219,7 +219,7 @@ int BLAKE2s_Update(BLAKE2S_CTX *c, const void *data, size_t datalen) ...@@ -219,7 +219,7 @@ int BLAKE2s_Update(BLAKE2S_CTX *c, const void *data, size_t datalen)
in += fill; in += fill;
datalen -= fill; datalen -= fill;
} }
if (datalen > BLAKE2S_BLOCKBYTES) { if (datalen > BLAKE2S_BLOCKBYTES) {
size_t stashlen = datalen % BLAKE2S_BLOCKBYTES; size_t stashlen = datalen % BLAKE2S_BLOCKBYTES;
/* /*
* If |datalen| is a multiple of the blocksize, stash * If |datalen| is a multiple of the blocksize, stash
......
...@@ -132,7 +132,7 @@ int DSA_meth_set_sign_setup(DSA_METHOD *dsam, ...@@ -132,7 +132,7 @@ int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
} }
int (*DSA_meth_get_verify(const DSA_METHOD *dsam)) int (*DSA_meth_get_verify(const DSA_METHOD *dsam))
(const unsigned char *, int , DSA_SIG *, DSA *) (const unsigned char *, int, DSA_SIG *, DSA *)
{ {
return dsam->dsa_do_verify; return dsam->dsa_do_verify;
} }
......
...@@ -210,14 +210,13 @@ digest name passed on the command line. ...@@ -210,14 +210,13 @@ digest name passed on the command line.
unsigned char md_value[EVP_MAX_MD_SIZE]; unsigned char md_value[EVP_MAX_MD_SIZE];
int md_len, i; int md_len, i;
if(!argv[1]) { if (!argv[1]) {
printf("Usage: mdtest digestname\n"); printf("Usage: mdtest digestname\n");
exit(1); exit(1);
} }
md = EVP_get_digestbyname(argv[1]); md = EVP_get_digestbyname(argv[1]);
if (md == NULL) {
if(!md) {
printf("Unknown message digest %s\n", argv[1]); printf("Unknown message digest %s\n", argv[1]);
exit(1); exit(1);
} }
......
...@@ -155,17 +155,17 @@ Reference Implementation: ...@@ -155,17 +155,17 @@ Reference Implementation:
} else { /* retrieve session */ } else { /* retrieve session */
key = findkey(name); key = findkey(name);
if (!key || key->expire < now() ) { if (!key || key->expire < now() ) {
return 0; return 0;
} }
HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL); HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL);
EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key->aes_key, iv ); EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key->aes_key, iv );
if (key->expire < ( now() - RENEW_TIME ) ) { if (key->expire < ( now() - RENEW_TIME ) )
/* return 2 - this session will get a new ticket even though the current is still valid */ /* return 2 - this session will get a new ticket even though the current is still valid */
return 2; return 2;
}
return 1; return 1;
} }
......
...@@ -199,7 +199,7 @@ int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam)) ...@@ -199,7 +199,7 @@ int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))
int DSA_meth_set_sign_setup(DSA_METHOD *dsam, int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **)); int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **));
int (*DSA_meth_get_verify(const DSA_METHOD *dsam)) int (*DSA_meth_get_verify(const DSA_METHOD *dsam))
(const unsigned char *, int , DSA_SIG *, DSA *); (const unsigned char *, int, DSA_SIG *, DSA *);
int DSA_meth_set_verify(DSA_METHOD *dsam, int DSA_meth_set_verify(DSA_METHOD *dsam,
int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *)); int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *));
int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam)) int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))
......
...@@ -205,7 +205,7 @@ static int async_write(BIO *bio, const char *in, int inl) ...@@ -205,7 +205,7 @@ static int async_write(BIO *bio, const char *in, int inl)
/* Write any data we have left after fragmenting */ /* Write any data we have left after fragmenting */
ret = 0; ret = 0;
if ((int)written < inl) { if ((int)written < inl) {
ret = BIO_write(next, in + written , inl - written); ret = BIO_write(next, in + written, inl - written);
} }
if (ret <= 0 && BIO_should_write(next)) if (ret <= 0 && BIO_should_write(next))
......
...@@ -837,7 +837,7 @@ static char *dup_str(const unsigned char *in, size_t len) ...@@ -837,7 +837,7 @@ static char *dup_str(const unsigned char *in, size_t len)
{ {
char *ret; char *ret;
if(len == 0) if (len == 0)
return NULL; return NULL;
/* Assert that the string does not contain NUL-bytes. */ /* Assert that the string does not contain NUL-bytes. */
......
...@@ -155,7 +155,7 @@ static void dump_data(const char *data, int len) ...@@ -155,7 +155,7 @@ static void dump_data(const char *data, int len)
printf("*** Message Fragment len: %d\n", fraglen); printf("*** Message Fragment len: %d\n", fraglen);
if (fragoff + fraglen > msglen) if (fragoff + fraglen > msglen)
printf("***---- HANDSHAKE MESSAGE FRAGMENT INVALID ----\n"); printf("***---- HANDSHAKE MESSAGE FRAGMENT INVALID ----\n");
else if(reclen < fraglen) else if (reclen < fraglen)
printf("**---- HANDSHAKE MESSAGE FRAGMENT TRUNCATED ----\n"); printf("**---- HANDSHAKE MESSAGE FRAGMENT TRUNCATED ----\n");
else else
printf("**---- END OF HANDSHAKE MESSAGE FRAGMENT ----\n"); printf("**---- END OF HANDSHAKE MESSAGE FRAGMENT ----\n");
...@@ -442,7 +442,7 @@ int mempacket_test_inject(BIO *bio, const char *in, int inl, int pktnum, ...@@ -442,7 +442,7 @@ int mempacket_test_inject(BIO *bio, const char *in, int inl, int pktnum,
else else
return inl; return inl;
} while(1); } while(1);
} else if(looppkt->num == thispkt->num) { } else if (looppkt->num == thispkt->num) {
if (!ctx->noinject) { if (!ctx->noinject) {
/* We injected two packets with the same packet number! */ /* We injected two packets with the same packet number! */
return -1; return -1;
......
...@@ -102,7 +102,7 @@ static int test_alt_chains_cert_forgery(const char *roots_f, ...@@ -102,7 +102,7 @@ static int test_alt_chains_cert_forgery(const char *roots_f,
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()); lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
if (lookup == NULL) if (lookup == NULL)
goto err; goto err;
if(!X509_LOOKUP_load_file(lookup, roots_f, X509_FILETYPE_PEM)) if (!X509_LOOKUP_load_file(lookup, roots_f, X509_FILETYPE_PEM))
goto err; goto err;
untrusted = load_certs_from_file(untrusted_f); untrusted = load_certs_from_file(untrusted_f);
...@@ -110,7 +110,7 @@ static int test_alt_chains_cert_forgery(const char *roots_f, ...@@ -110,7 +110,7 @@ static int test_alt_chains_cert_forgery(const char *roots_f,
if ((bio = BIO_new_file(bad_f, "r")) == NULL) if ((bio = BIO_new_file(bad_f, "r")) == NULL)
goto err; goto err;
if((x = PEM_read_bio_X509(bio, NULL, 0, NULL)) == NULL) if ((x = PEM_read_bio_X509(bio, NULL, 0, NULL)) == NULL)
goto err; goto err;
sctx = X509_STORE_CTX_new(); sctx = X509_STORE_CTX_new();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册