Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/evp/e_seed.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5 | static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6 | const unsigned char *iv, int enc); | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
7 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8 | typedef struct { | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9 | SEED_KEY_SCHEDULE ks; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10 | } EVP_SEED_KEY; | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12 | static 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))
never executed: if (inlend of block
executed 427 times by 1 test: returnSEED_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:
executed 427 times by 1 test: 1;return 1; Executed by:
executed 427 times by 1 test: } 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 == 1return 1; Executed by:
never executed: if (inl < chunkchunk >>= 3;
executed 70 times by 1 test: while (inlchunk = inl; Executed by:
executed 70 times by 1 test: }chunk = inl; Executed by:
executed 70 times by 1 test: returnend of block Executed by:
executed 70 times by 1 test: 1;return 1; Executed by:
executed 70 times by 1 test: } 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 < blreturn 1; Executed by:
never executed: 1;return 1; never executed: inl -= bl; for (i=0; i <= inlreturn 1;
executed 882 times by 1 test: returnSEED_ecb_encrypt(in + i, out + i, &((EVP_SEED_KEY *)EVP_CIPHER_CTX_get_cipher_data(ctx))->ks, EVP_CIPHER_CTX_encrypting(ctx)); Executed by:
executed 227 times by 1 test: 1;return 1; Executed by:
executed 227 times by 1 test: } 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))return 1; Executed by:
never executed: if (inlend of block
executed 70 times by 1 test: returnend of block Executed by:
executed 70 times by 1 test: 1;return 1; Executed by:
executed 70 times by 1 test: } 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, return 1; Executed by:
| 0-882 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
14 | }; const EVP_CIPHER *EVP_seed_cbc(void) { return executed 3920 times by 1 test: &seed_cbc;return &seed_cbc; Executed by:
executed 3920 times by 1 test: } 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, return &seed_cbc; Executed by:
| 3920 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
15 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
16 | }; const EVP_CIPHER *EVP_seed_cfb128(void) { return executed 1962 times by 1 test: &seed_cfb128;return &seed_cfb128; Executed by:
executed 1962 times by 1 test: } 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, return &seed_cfb128; Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
18 | }; const EVP_CIPHER *EVP_seed_ofb(void) { return executed 1962 times by 1 test: &seed_ofb;return &seed_ofb; Executed by:
executed 1962 times by 1 test: } 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, return &seed_ofb; Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 | ((void *)0) | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 | }; const EVP_CIPHER *EVP_seed_ecb(void) { return executed 1962 times by 1 test: &seed_ecb;return &seed_ecb; Executed by:
executed 1962 times by 1 test: }return &seed_ecb; Executed by:
| 1962 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
21 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
22 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
23 | - | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
24 | static 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: 1;return 1; Executed by:
executed 230 times by 1 test: return 1; Executed by:
| 230 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
29 | } | - | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Switch to Source code | Preprocessed file |