OpenCoverage

e_seed.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/evp/e_seed.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,-
6 const unsigned char *iv, int enc);-
7-
8typedef struct {-
9 SEED_KEY_SCHEDULE ks;-
10} EVP_SEED_KEY;-
11-
12static int seed_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 427 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { SEED_cbc_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx)); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 427 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) SEED_cbc_encrypt(in, out, (long)inl, &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
executed 427 times by 1 test: SEED_cbc_encrypt(in, out, (long)inl, &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 427 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 427 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int seed_cfb128_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t chunk = ((size_t)1<<(sizeof(long)*8-2)); if (128 == 1
128 == 1Description
TRUEnever evaluated
FALSEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) chunk >>= 3;
never executed: chunk >>= 3;
if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
while (inl
inlDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
&& inl >= chunk
inl >= chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); SEED_cfb128_encrypt(in, out, (long) ((128 == 1) && !EVP_CIPHER_CTX_test_flags(ctx, 0x2000) ? chunk*8 : chunk), &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num, EVP_CIPHER_CTX_encrypting(ctx)); EVP_CIPHER_CTX_set_num(ctx, num); inl -= chunk; in += chunk; out += chunk; if (inl < chunk
inl < chunkDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) chunk = inl;
executed 70 times by 1 test: chunk = inl;
Executed by:
  • libcrypto.so.1.1
}
executed 70 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int seed_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { size_t i, bl; bl = EVP_CIPHER_CTX_cipher(ctx)->block_size; if (inl < bl
inl < blDescription
TRUEnever evaluated
FALSEevaluated 227 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) return
never executed: return 1;
1;
never executed: return 1;
inl -= bl; for (i=0; i <= inl
i <= inlDescription
TRUEevaluated 882 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 227 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
; i+=bl) SEED_ecb_encrypt(in + i, out + i, &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
executed 882 times by 1 test: SEED_ecb_encrypt(in + i, out + i, &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx));
Executed by:
  • libcrypto.so.1.1
return
executed 227 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 227 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static int seed_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t inl) { while(inl>=((size_t)1<<(sizeof(long)*8-2))
inl>=((size_t)...of(long)*8-2))Description
TRUEnever evaluated
FALSEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) { int num = EVP_CIPHER_CTX_num(ctx); SEED_ofb128_encrypt(in, out, (long)((size_t)1<<(sizeof(long)*8-2)), &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); inl-=((size_t)1<<(sizeof(long)*8-2)); in +=((size_t)1<<(sizeof(long)*8-2)); out+=((size_t)1<<(sizeof(long)*8-2)); }
never executed: end of block
if (inl
inlDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
) { int num = EVP_CIPHER_CTX_num(ctx); SEED_ofb128_encrypt(in, out, (long)inl, &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_iv_noconst(ctx), &num); EVP_CIPHER_CTX_set_num(ctx, num); }
executed 70 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
return
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 70 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER seed_cbc = { 777, 16, 16, 16, 0x1000 | 0x2, seed_init_key, seed_cbc_cipher, 0, sizeof(EVP_SEED_KEY), 0, 0, 0,
0-882
13((void *)0) -
14}; const EVP_CIPHER *EVP_seed_cbc(void) { return
executed 3920 times by 1 test: return &seed_cbc;
Executed by:
  • libcrypto.so.1.1
&seed_cbc;
executed 3920 times by 1 test: return &seed_cbc;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER seed_cfb128 = { 779, 1, 16, 16, 0x1000 | 0x3, seed_init_key, seed_cfb128_cipher, 0, sizeof(EVP_SEED_KEY), 0, 0, 0,
3920
15((void *)0) -
16}; const EVP_CIPHER *EVP_seed_cfb128(void) { return
executed 1962 times by 1 test: return &seed_cfb128;
Executed by:
  • libcrypto.so.1.1
&seed_cfb128;
executed 1962 times by 1 test: return &seed_cfb128;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER seed_ofb = { 778, 1, 16, 16, 0x1000 | 0x4, seed_init_key, seed_ofb_cipher, 0, sizeof(EVP_SEED_KEY), 0, 0, 0,
1962
17((void *)0) -
18}; const EVP_CIPHER *EVP_seed_ofb(void) { return
executed 1962 times by 1 test: return &seed_ofb;
Executed by:
  • libcrypto.so.1.1
&seed_ofb;
executed 1962 times by 1 test: return &seed_ofb;
Executed by:
  • libcrypto.so.1.1
} static const EVP_CIPHER seed_ecb = { 776, 16, 16, 0, 0x1000 | 0x1, seed_init_key, seed_ecb_cipher, 0, sizeof(EVP_SEED_KEY), 0, 0, 0,
1962
19((void *)0) -
20}; const EVP_CIPHER *EVP_seed_ecb(void) { return
executed 1962 times by 1 test: return &seed_ecb;
Executed by:
  • libcrypto.so.1.1
&seed_ecb;
executed 1962 times by 1 test: return &seed_ecb;
Executed by:
  • libcrypto.so.1.1
}
1962
21-
22-
23-
24static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,-
25 const unsigned char *iv, int enc)-
26{-
27 SEED_set_key(key, &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks);-
28 return
executed 230 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 230 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
230
29}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2