CONF *to_free = NULL;
if (config == NULL)
- config = to_free = app_load_config_quiet(default_config_file);
+ config = to_free = app_load_config_quiet(default_config_file);
if (config == NULL)
- return 1;
+ return 1;
if (CONF_modules_load(config, NULL, 0) <= 0) {
BIO_printf(bio_err, "Error configuring OpenSSL modules\n");
break;
case OPT_V_NO_ALT_CHAINS:
X509_VERIFY_PARAM_set_flags(vpm, X509_V_FLAG_NO_ALT_CHAINS);
- break;
+ break;
case OPT_V_NO_CHECK_TIME:
X509_VERIFY_PARAM_set_flags(vpm, X509_V_FLAG_NO_CHECK_TIME);
- break;
+ break;
}
return 1;
if (datalen > BLAKE2B_BLOCKBYTES) {
size_t stashlen = datalen % BLAKE2B_BLOCKBYTES;
/*
- * If |datalen| is a multiple of the blocksize, stash
- * last complete block, it can be final one...
+ * If |datalen| is a multiple of the blocksize, stash
+ * last complete block, it can be final one...
*/
stashlen = stashlen ? stashlen : BLAKE2B_BLOCKBYTES;
datalen -= stashlen;
if (datalen > BLAKE2S_BLOCKBYTES) {
size_t stashlen = datalen % BLAKE2S_BLOCKBYTES;
/*
- * If |datalen| is a multiple of the blocksize, stash
- * last complete block, it can be final one...
+ * If |datalen| is a multiple of the blocksize, stash
+ * last complete block, it can be final one...
*/
stashlen = stashlen ? stashlen : BLAKE2S_BLOCKBYTES;
datalen -= stashlen;
# endif /* __INITIAL_POINTER_SIZE == 64 */
const char *sp1, *sp2; /* Search result */
- const char *ext = NULL; /* possible extension to add */
+ const char *ext = NULL; /* possible extension to add */
if (filename == NULL) {
DSOerr(DSO_F_VMS_LOAD, DSO_R_NO_FILENAME);
}
/*
- * row[0] is implicitly (0,0,0) (the point at infinity), therefore it
- * is not stored. All other values are actually stored with an offset
- * of -1 in table.
+ * row[0] is implicitly (0,0,0) (the point at infinity), therefore it
+ * is not stored. All other values are actually stored with an offset
+ * of -1 in table.
*/
ecp_nistz256_scatter_w5 (row, &temp[0], 1);
/* See if we recognise the key derivation function */
if (!EVP_PBE_find(EVP_PBE_TYPE_KDF, OBJ_obj2nid(pbe2->keyfunc->algorithm),
- NULL, NULL, &kdf)) {
+ NULL, NULL, &kdf)) {
EVPerr(EVP_F_PKCS5_V2_PBE_KEYIVGEN,
EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION);
goto err;
/* C_i = Offset_i xor ENCIPHER(K, P_i xor Offset_i) */
inblock =
- (OCB_BLOCK *)(in + ((i - ctx->blocks_processed - 1) * 16));
+ (OCB_BLOCK *)(in + ((i - ctx->blocks_processed - 1) * 16));
ocb_block16_xor_misaligned(&ctx->offset, inblock, &tmp1);
/* Checksum_i = Checksum_{i-1} xor P_i */
ocb_block16_xor_misaligned(&ctx->checksum, inblock, &ctx->checksum);
#if defined(OPENSSL_SYS_VMS_DECC) || defined(OPENSSL_SYS_UEFI)
static int obj_strcmp(const char *a, const char *b)
{
- return strcmp(a, b);
+ return strcmp(a, b);
}
#else
#define obj_strcmp strcmp
h0 = (u64)(d0 = (u128)h0 + U8TOU64(inp + 0));
h1 = (u64)(d1 = (u128)h1 + (d0 >> 64) + U8TOU64(inp + 8));
/*
- * padbit can be zero only when original len was
- * POLY1306_BLOCK_SIZE, but we don't check
- */
+ * padbit can be zero only when original len was
+ * POLY1306_BLOCK_SIZE, but we don't check
+ */
h2 += (u64)(d1 >> 64) + padbit;
/* h *= r "%" p, where "%" stands for "partial remainder" */
((u128)h1 * s1);
d1 = ((u128)h0 * r1) +
((u128)h1 * r0) +
- (h2 * s1);
+ (h2 * s1);
h2 = (h2 * r0);
/* last reduction step: */
Poly1305_Init(&poly1305, key);
for (i=0;i<100000;i++)
- Poly1305_Update(&poly1305,buf,sizeof(buf));
+ Poly1305_Update(&poly1305,buf,sizeof(buf));
- stopwatch = OPENSSL_rdtsc();
+ stopwatch = OPENSSL_rdtsc();
for (i=0;i<10000;i++)
- Poly1305_Update(&poly1305,buf,sizeof(buf));
- stopwatch = OPENSSL_rdtsc() - stopwatch;
+ Poly1305_Update(&poly1305,buf,sizeof(buf));
+ stopwatch = OPENSSL_rdtsc() - stopwatch;
- printf("%g\n",stopwatch/(double)(i*sizeof(buf)));
+ printf("%g\n",stopwatch/(double)(i*sizeof(buf)));
stopwatch = OPENSSL_rdtsc();
for (i=0;i<10000;i++) {
unsigned long hwcap = getauxval(HWCAP);
if (hwcap & HWCAP_FPU) {
- OPENSSL_ppccap_P |= PPC_FPU;
+ OPENSSL_ppccap_P |= PPC_FPU;
if (sizeof(size_t) == 4) {
/* In 32-bit case PPC_FPU64 is always fastest [if option] */
cmplen = i2dlen;
if (md != NULL) {
- cmpbuf = mdbuf;
- if (!EVP_Digest(i2dbuf, i2dlen, cmpbuf, &cmplen, md, 0)) {
- matched = -1;
+ cmpbuf = mdbuf;
+ if (!EVP_Digest(i2dbuf, i2dlen, cmpbuf, &cmplen, md, 0)) {
+ matched = -1;
break;
}
}
*/
mydata.verify_depth = verify_depth; ...
SSL_set_ex_data(ssl, mydata_index, &mydata);
-
+
...
SSL_accept(ssl); /* check of success left out for clarity */
if (peer = SSL_get_peer_certificate(ssl))
ASN1_ITEM_end(tname)
# define static_ASN1_NDEF_SEQUENCE_END(tname) \
;\
- static_ASN1_ITEM_start(tname) \
+ static_ASN1_ITEM_start(tname) \
ASN1_ITYPE_NDEF_SEQUENCE,\
V_ASN1_SEQUENCE,\
tname##_seq_tt,\
# define ASN1_BROKEN_SEQUENCE_END(stname) ASN1_SEQUENCE_END_ref(stname, stname)
# define static_ASN1_BROKEN_SEQUENCE_END(stname) \
- static_ASN1_SEQUENCE_END_ref(stname, stname)
+ static_ASN1_SEQUENCE_END_ref(stname, stname)
# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
* invalid input, set the SNI name first.
*/
if (s->tlsext_hostname == NULL) {
- if (!SSL_set_tlsext_host_name(s, basedomain)) {
+ if (!SSL_set_tlsext_host_name(s, basedomain)) {
SSLerr(SSL_F_SSL_DANE_ENABLE, SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN);
- return -1;
+ return -1;
}
}
}
case SSL_CTRL_GET_EXTMS_SUPPORT:
if (!s->session || SSL_in_init(s) || ossl_statem_get_in_handshake(s))
- return -1;
- if (s->session->flags & SSL_SESS_FLAG_EXTMS)
+ return -1;
+ if (s->session->flags & SSL_SESS_FLAG_EXTMS)
return 1;
else
return 0;
return -1;
if (!X509_STORE_CTX_init(store_ctx, store, cert, chain))
- return 0;
+ return 0;
X509_STORE_CTX_set_ex_data(store_ctx, store_ctx_idx, ssl);
X509_STORE_CTX_set_default(store_ctx,
store_ctx_dane_init(store_ctx, ssl);
if (SSL_get_verify_callback(ssl))
- X509_STORE_CTX_set_verify_cb(store_ctx, SSL_get_verify_callback(ssl));
+ X509_STORE_CTX_set_verify_cb(store_ctx, SSL_get_verify_callback(ssl));
ret = X509_verify_cert(store_ctx);
char *header = 0;
unsigned char *data = 0;
long len;
- char *errtype = 0; /* if error: cert or pkey? */
+ char *errtype = 0; /* if error: cert or pkey? */
STACK_OF(X509) *chain;
typedef X509 *(*d2i_X509_t)(X509 **, const unsigned char **, long);
if ((chain = sk_X509_new_null()) == 0) {
- perror("malloc");
- exit(1);
+ perror("malloc");
+ exit(1);
}
for (count = 0;
- count < nelem && errtype == 0
+ count < nelem && errtype == 0
&& PEM_read_bio(fp, &name, &header, &data, &len);
- ++count) {
- const unsigned char *p = data;
-
- if (strcmp(name, PEM_STRING_X509) == 0
- || strcmp(name, PEM_STRING_X509_TRUSTED) == 0
- || strcmp(name, PEM_STRING_X509_OLD) == 0) {
- d2i_X509_t d = strcmp(name, PEM_STRING_X509_TRUSTED) ?
- d2i_X509_AUX : d2i_X509;
- X509 *cert = d(0, &p, len);
-
- if (cert == 0 || (p - data) != len)
- errtype = "certificate";
- else if (sk_X509_push(chain, cert) == 0) {
- perror("malloc");
- goto err;
- }
- } else {
- fprintf(stderr, "unexpected chain file object: %s\n", name);
- goto err;
- }
-
- /*
- * If any of these were null, PEM_read() would have failed.
- */
- OPENSSL_free(name);
- OPENSSL_free(header);
- OPENSSL_free(data);
+ ++count) {
+ const unsigned char *p = data;
+
+ if (strcmp(name, PEM_STRING_X509) == 0
+ || strcmp(name, PEM_STRING_X509_TRUSTED) == 0
+ || strcmp(name, PEM_STRING_X509_OLD) == 0) {
+ d2i_X509_t d = strcmp(name, PEM_STRING_X509_TRUSTED) ?
+ d2i_X509_AUX : d2i_X509;
+ X509 *cert = d(0, &p, len);
+
+ if (cert == 0 || (p - data) != len)
+ errtype = "certificate";
+ else if (sk_X509_push(chain, cert) == 0) {
+ perror("malloc");
+ goto err;
+ }
+ } else {
+ fprintf(stderr, "unexpected chain file object: %s\n", name);
+ goto err;
+ }
+
+ /*
+ * If any of these were null, PEM_read() would have failed.
+ */
+ OPENSSL_free(name);
+ OPENSSL_free(header);
+ OPENSSL_free(data);
}
if (errtype) {
- fprintf(stderr, "error reading: malformed %s\n", errtype);
+ fprintf(stderr, "error reading: malformed %s\n", errtype);
goto err;
}