Commit c4b3503b authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

Fix signed/unsigned warnings and make several functions static.

parent f871545f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ void FIPS_corrupt_dsa_keygen(void)

static int dsa_builtin_keygen(DSA *dsa);

int fips_check_dsa(DSA *dsa)
static int fips_check_dsa(DSA *dsa)
	{
	EVP_PKEY pk;
	unsigned char tbs[] = "DSA Pairwise Check Data";
+2 −0
Original line number Diff line number Diff line
@@ -70,6 +70,7 @@
 * case of a DSA signature.
 */

#if 0
int FIPS_dsa_size(DSA *r)
	{
	int ilen;
@@ -83,6 +84,7 @@ int FIPS_dsa_size(DSA *r)
	 */
	return ilen * 2 + 6;
	}
#endif

/* Tiny ASN1 encoder for DSA_SIG structure. We can assume r, s smaller than
 * 0x80 octets as by the DSA standards they will be less than 2^160
+2 −2
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
		
		reset=1;
		j=M_EVP_MD_block_size(md);
		OPENSSL_assert(j <= sizeof ctx->key);
		OPENSSL_assert(j <= (int)sizeof ctx->key);
		if (j < len)
			{
			EVP_DigestInit_ex(&ctx->md_ctx,md, impl);
@@ -98,7 +98,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
			}
		else
			{
			OPENSSL_assert(len <= sizeof ctx->key);
			OPENSSL_assert(len <= (int)sizeof ctx->key);
			memcpy(ctx->key,key,len);
			ctx->key_length=len;
			}
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ static const HMAC_KAT vector[] = {

int FIPS_selftest_hmac()
    {
    int n;
    size_t n;
    unsigned int    outlen;
    unsigned char   out[EVP_MAX_MD_SIZE];
    const EVP_MD   *md;
+2 −2
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ void FIPS_rng_stick(void)
	fips_prng_fail = 1;
	}

void fips_rand_prng_reset(FIPS_PRNG_CTX *ctx)
static void fips_rand_prng_reset(FIPS_PRNG_CTX *ctx)
	{
	ctx->seeded = 0;
	ctx->keyed = 0;
@@ -192,7 +192,7 @@ static int fips_set_prng_seed(FIPS_PRNG_CTX *ctx,
	return 1;
	}

int fips_set_test_mode(FIPS_PRNG_CTX *ctx)
static int fips_set_test_mode(FIPS_PRNG_CTX *ctx)
	{
	if (ctx->keyed)
		{
Loading