Loading crypto/aes/aes_ige.c +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ typedef struct { unsigned long data[N_WORDS]; } aes_block_t; // XXX: probably some better way to do this /* XXX: probably some better way to do this */ #if defined(__i386__) || defined(__x86_64__) #define UNALIGNED_MEMOPS_ARE_FAST 1 #endif Loading crypto/bn/bntest.c +30 −30 Original line number Diff line number Diff line Loading @@ -184,120 +184,120 @@ int main(int argc, char *argv[]) message(out,"BN_add"); if (!test_add(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_sub"); if (!test_sub(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_lshift1"); if (!test_lshift1(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_lshift (fixed)"); if (!test_lshift(out,ctx,BN_bin2bn(lst,sizeof(lst)-1,NULL))) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_lshift"); if (!test_lshift(out,ctx,NULL)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_rshift1"); if (!test_rshift1(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_rshift"); if (!test_rshift(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_sqr"); if (!test_sqr(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mul"); if (!test_mul(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_div"); if (!test_div(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_div_word"); if (!test_div_word(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_div_recp"); if (!test_div_recp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod"); if (!test_mod(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_mul"); if (!test_mod_mul(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mont"); if (!test_mont(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_exp"); if (!test_mod_exp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_exp_mont_consttime"); if (!test_mod_exp_mont_consttime(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_exp"); if (!test_exp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_kronecker"); if (!test_kron(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_sqrt"); if (!test_sqrt(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_add"); if (!test_gf2m_add(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod"); if (!test_gf2m_mod(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_mul"); if (!test_gf2m_mod_mul(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_sqr"); if (!test_gf2m_mod_sqr(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_inv"); if (!test_gf2m_mod_inv(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_div"); if (!test_gf2m_mod_div(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_exp"); if (!test_gf2m_mod_exp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_sqrt"); if (!test_gf2m_mod_sqrt(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_solve_quad"); if (!test_gf2m_mod_solve_quad(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); BN_CTX_free(ctx); BIO_free(out); Loading @@ -307,7 +307,7 @@ int main(int argc, char *argv[]) err: BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices * the failure, see test_bn in test/Makefile.ssl*/ BIO_flush(out); (void)BIO_flush(out); ERR_load_crypto_strings(); ERR_print_errors_fp(stderr); EXIT(1); Loading crypto/ecdh/ecdhtest.c +5 −5 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) #ifdef NOISY BIO_puts(out,"\n"); #else BIO_flush(out); (void)BIO_flush(out); #endif if (!EC_KEY_generate_key(a)) goto err; Loading @@ -173,7 +173,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out," ."); BIO_flush(out); (void)BIO_flush(out); #endif if (!EC_KEY_generate_key(b)) goto err; Loading @@ -199,7 +199,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out,"."); BIO_flush(out); (void)BIO_flush(out); #endif alen=KDF1_SHA1_len; Loading @@ -216,7 +216,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out,"."); BIO_flush(out); (void)BIO_flush(out); #endif blen=KDF1_SHA1_len; Loading @@ -233,7 +233,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out,"."); BIO_flush(out); (void)BIO_flush(out); #endif if ((aout < 4) || (bout != aout) || (memcmp(abuf,bbuf,aout) != 0)) Loading crypto/ecdsa/ecdsatest.c +11 −11 Original line number Diff line number Diff line Loading @@ -203,13 +203,13 @@ int x9_62_test_internal(BIO *out, int nid, const char *r_in, const char *s_in) if (!EC_KEY_generate_key(key)) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* create the signature */ signature = ECDSA_do_sign(digest, 20, key); if (signature == NULL) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* compare the created signature with the expected signature */ if ((r = BN_new()) == NULL || (s = BN_new()) == NULL) goto x962_int_err; Loading @@ -219,12 +219,12 @@ int x9_62_test_internal(BIO *out, int nid, const char *r_in, const char *s_in) if (BN_cmp(signature->r ,r) || BN_cmp(signature->s, s)) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* verify the signature */ if (ECDSA_do_verify(digest, 20, signature, key) != 1) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); BIO_printf(out, " ok\n"); ret = 1; Loading Loading @@ -369,7 +369,7 @@ int test_builtin(BIO *out) } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* check key */ if (!EC_KEY_check_key(eckey)) { Loading @@ -377,7 +377,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* create signature */ sig_len = ECDSA_size(eckey); if ((signature = OPENSSL_malloc(sig_len)) == NULL) Loading @@ -388,7 +388,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* verify signature */ if (ECDSA_verify(0, digest, 20, signature, sig_len, eckey) != 1) { Loading @@ -396,7 +396,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* verify signature with the wrong key */ if (ECDSA_verify(0, digest, 20, signature, sig_len, wrong_eckey) == 1) Loading @@ -405,7 +405,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* wrong digest */ if (ECDSA_verify(0, wrong_digest, 20, signature, sig_len, eckey) == 1) Loading @@ -414,7 +414,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* modify a single byte of the signature */ offset = signature[10] % sig_len; dirt = signature[11]; Loading @@ -425,7 +425,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); BIO_printf(out, " ok\n"); /* cleanup */ Loading crypto/evp/e_seed.c +1 −1 Original line number Diff line number Diff line Loading @@ -54,11 +54,11 @@ */ #include <openssl/opensslconf.h> #ifndef OPENSSL_NO_SEED #include <openssl/evp.h> #include <openssl/err.h> #include <string.h> #include <assert.h> #ifndef OPENSSL_NO_SEED #include <openssl/seed.h> #include "evp_locl.h" Loading Loading
crypto/aes/aes_ige.c +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ typedef struct { unsigned long data[N_WORDS]; } aes_block_t; // XXX: probably some better way to do this /* XXX: probably some better way to do this */ #if defined(__i386__) || defined(__x86_64__) #define UNALIGNED_MEMOPS_ARE_FAST 1 #endif Loading
crypto/bn/bntest.c +30 −30 Original line number Diff line number Diff line Loading @@ -184,120 +184,120 @@ int main(int argc, char *argv[]) message(out,"BN_add"); if (!test_add(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_sub"); if (!test_sub(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_lshift1"); if (!test_lshift1(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_lshift (fixed)"); if (!test_lshift(out,ctx,BN_bin2bn(lst,sizeof(lst)-1,NULL))) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_lshift"); if (!test_lshift(out,ctx,NULL)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_rshift1"); if (!test_rshift1(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_rshift"); if (!test_rshift(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_sqr"); if (!test_sqr(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mul"); if (!test_mul(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_div"); if (!test_div(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_div_word"); if (!test_div_word(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_div_recp"); if (!test_div_recp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod"); if (!test_mod(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_mul"); if (!test_mod_mul(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mont"); if (!test_mont(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_exp"); if (!test_mod_exp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_exp_mont_consttime"); if (!test_mod_exp_mont_consttime(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_exp"); if (!test_exp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_kronecker"); if (!test_kron(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_mod_sqrt"); if (!test_sqrt(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_add"); if (!test_gf2m_add(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod"); if (!test_gf2m_mod(out)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_mul"); if (!test_gf2m_mod_mul(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_sqr"); if (!test_gf2m_mod_sqr(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_inv"); if (!test_gf2m_mod_inv(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_div"); if (!test_gf2m_mod_div(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_exp"); if (!test_gf2m_mod_exp(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_sqrt"); if (!test_gf2m_mod_sqrt(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); message(out,"BN_GF2m_mod_solve_quad"); if (!test_gf2m_mod_solve_quad(out,ctx)) goto err; BIO_flush(out); (void)BIO_flush(out); BN_CTX_free(ctx); BIO_free(out); Loading @@ -307,7 +307,7 @@ int main(int argc, char *argv[]) err: BIO_puts(out,"1\n"); /* make sure the Perl script fed by bc notices * the failure, see test_bn in test/Makefile.ssl*/ BIO_flush(out); (void)BIO_flush(out); ERR_load_crypto_strings(); ERR_print_errors_fp(stderr); EXIT(1); Loading
crypto/ecdh/ecdhtest.c +5 −5 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) #ifdef NOISY BIO_puts(out,"\n"); #else BIO_flush(out); (void)BIO_flush(out); #endif if (!EC_KEY_generate_key(a)) goto err; Loading @@ -173,7 +173,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out," ."); BIO_flush(out); (void)BIO_flush(out); #endif if (!EC_KEY_generate_key(b)) goto err; Loading @@ -199,7 +199,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out,"."); BIO_flush(out); (void)BIO_flush(out); #endif alen=KDF1_SHA1_len; Loading @@ -216,7 +216,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out,"."); BIO_flush(out); (void)BIO_flush(out); #endif blen=KDF1_SHA1_len; Loading @@ -233,7 +233,7 @@ static int test_ecdh_curve(int nid, const char *text, BN_CTX *ctx, BIO *out) BIO_puts(out,"\n"); #else BIO_printf(out,"."); BIO_flush(out); (void)BIO_flush(out); #endif if ((aout < 4) || (bout != aout) || (memcmp(abuf,bbuf,aout) != 0)) Loading
crypto/ecdsa/ecdsatest.c +11 −11 Original line number Diff line number Diff line Loading @@ -203,13 +203,13 @@ int x9_62_test_internal(BIO *out, int nid, const char *r_in, const char *s_in) if (!EC_KEY_generate_key(key)) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* create the signature */ signature = ECDSA_do_sign(digest, 20, key); if (signature == NULL) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* compare the created signature with the expected signature */ if ((r = BN_new()) == NULL || (s = BN_new()) == NULL) goto x962_int_err; Loading @@ -219,12 +219,12 @@ int x9_62_test_internal(BIO *out, int nid, const char *r_in, const char *s_in) if (BN_cmp(signature->r ,r) || BN_cmp(signature->s, s)) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* verify the signature */ if (ECDSA_do_verify(digest, 20, signature, key) != 1) goto x962_int_err; BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); BIO_printf(out, " ok\n"); ret = 1; Loading Loading @@ -369,7 +369,7 @@ int test_builtin(BIO *out) } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* check key */ if (!EC_KEY_check_key(eckey)) { Loading @@ -377,7 +377,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* create signature */ sig_len = ECDSA_size(eckey); if ((signature = OPENSSL_malloc(sig_len)) == NULL) Loading @@ -388,7 +388,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* verify signature */ if (ECDSA_verify(0, digest, 20, signature, sig_len, eckey) != 1) { Loading @@ -396,7 +396,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* verify signature with the wrong key */ if (ECDSA_verify(0, digest, 20, signature, sig_len, wrong_eckey) == 1) Loading @@ -405,7 +405,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* wrong digest */ if (ECDSA_verify(0, wrong_digest, 20, signature, sig_len, eckey) == 1) Loading @@ -414,7 +414,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); /* modify a single byte of the signature */ offset = signature[10] % sig_len; dirt = signature[11]; Loading @@ -425,7 +425,7 @@ int test_builtin(BIO *out) goto builtin_err; } BIO_printf(out, "."); BIO_flush(out); (void)BIO_flush(out); BIO_printf(out, " ok\n"); /* cleanup */ Loading
crypto/evp/e_seed.c +1 −1 Original line number Diff line number Diff line Loading @@ -54,11 +54,11 @@ */ #include <openssl/opensslconf.h> #ifndef OPENSSL_NO_SEED #include <openssl/evp.h> #include <openssl/err.h> #include <string.h> #include <assert.h> #ifndef OPENSSL_NO_SEED #include <openssl/seed.h> #include "evp_locl.h" Loading