/*
* value type: - no value (also the value zero), n number, p positive
* 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.
*/
int valtype;
} else if (informat == FORMAT_ENGINE) {
EVP_PKEY *pkey;
if (pubin)
- pkey = load_pubkey(infile, informat , 1, passin, e, "Public Key");
+ pkey = load_pubkey(infile, informat, 1, passin, e, "Public Key");
else
pkey = load_key(infile, informat, 1, passin, e, "Private Key");
if (pkey != NULL) {
else
r = BN_dec2bn(&bn, argv[0]);
- if(!r) {
+ if (!r) {
BIO_printf(bio_err, "Failed to process value (%s)\n", argv[0]);
goto end;
}
in += fill;
datalen -= fill;
}
- if (datalen > BLAKE2S_BLOCKBYTES) {
+ if (datalen > BLAKE2S_BLOCKBYTES) {
size_t stashlen = datalen % BLAKE2S_BLOCKBYTES;
/*
* If |datalen| is a multiple of the blocksize, stash
}
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;
}
unsigned char md_value[EVP_MAX_MD_SIZE];
int md_len, i;
- if(!argv[1]) {
+ if (!argv[1]) {
printf("Usage: mdtest digestname\n");
exit(1);
}
md = EVP_get_digestbyname(argv[1]);
-
- if(!md) {
+ if (md == NULL) {
printf("Unknown message digest %s\n", argv[1]);
exit(1);
}
} else { /* retrieve session */
key = findkey(name);
- if (!key || key->expire < now() ) {
+ if (!key || key->expire < now() ) {
return 0;
}
HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL);
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;
- }
+
return 1;
}
int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **));
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 (*verify) (const unsigned char *, int, DSA_SIG *, DSA *));
int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))
/* Write any data we have left after fragmenting */
ret = 0;
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))
{
char *ret;
- if(len == 0)
+ if (len == 0)
return NULL;
/* Assert that the string does not contain NUL-bytes. */
printf("*** Message Fragment len: %d\n", fraglen);
if (fragoff + fraglen > msglen)
printf("***---- HANDSHAKE MESSAGE FRAGMENT INVALID ----\n");
- else if(reclen < fraglen)
+ else if (reclen < fraglen)
printf("**---- HANDSHAKE MESSAGE FRAGMENT TRUNCATED ----\n");
else
printf("**---- END OF HANDSHAKE MESSAGE FRAGMENT ----\n");
else
return inl;
} while(1);
- } else if(looppkt->num == thispkt->num) {
+ } else if (looppkt->num == thispkt->num) {
if (!ctx->noinject) {
/* We injected two packets with the same packet number! */
return -1;
lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file());
if (lookup == NULL)
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;
untrusted = load_certs_from_file(untrusted_f);
if ((bio = BIO_new_file(bad_f, "r")) == NULL)
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;
sctx = X509_STORE_CTX_new();