Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/des/cbc_cksm.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | DES_LONG DES_cbc_cksum(const unsigned char *in, DES_cblock *output, | - | ||||||
3 | long length, DES_key_schedule *schedule, | - | ||||||
4 | const_DES_cblock *ivec) | - | ||||||
5 | { | - | ||||||
6 | register DES_LONG tout0, tout1, tin0, tin1; | - | ||||||
7 | register long l = length; | - | ||||||
8 | DES_LONG tin[2]; | - | ||||||
9 | unsigned char *out = &(*output)[0]; | - | ||||||
10 | const unsigned char *iv = &(*ivec)[0]; | - | ||||||
11 | - | |||||||
12 | (tout0 =((DES_LONG)(*((iv)++))) , tout0|=((DES_LONG)(*((iv)++)))<< 8L, tout0|=((DES_LONG)(*((iv)++)))<<16L, tout0|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
13 | (tout1 =((DES_LONG)(*((iv)++))) , tout1|=((DES_LONG)(*((iv)++)))<< 8L, tout1|=((DES_LONG)(*((iv)++)))<<16L, tout1|=((DES_LONG)(*((iv)++)))<<24L); | - | ||||||
14 | for (; l > 0
| 1-4 | ||||||
15 | if (l >= 8
| 1-3 | ||||||
16 | (tin0 =((DES_LONG)(*((in)++))) , tin0|=((DES_LONG)(*((in)++)))<< 8L, tin0|=((DES_LONG)(*((in)++)))<<16L, tin0|=((DES_LONG)(*((in)++)))<<24L); | - | ||||||
17 | (tin1 =((DES_LONG)(*((in)++))) , tin1|=((DES_LONG)(*((in)++)))<< 8L, tin1|=((DES_LONG)(*((in)++)))<<16L, tin1|=((DES_LONG)(*((in)++)))<<24L); | - | ||||||
18 | } executed 3 times by 1 test: elseend of block Executed by:
| 3 | ||||||
19 | { in+=l; tin0=tin1=0; switch (l) { case never executed: 8:case 8: never executed: tin1 =((DES_LONG)(*(--(in))))<<24L; casecase 8: never executed: 7:case 7: never executed: case 7: code before this statement never executed: tin1|=((DES_LONG)(*(--(in))))<<16L; casecase 7: never executed: 6:case 6: never executed: case 6: code before this statement never executed: tin1|=((DES_LONG)(*(--(in))))<< 8L; casecase 6: never executed: 5:case 5: never executed: case 5: code before this statement never executed: tin1|=((DES_LONG)(*(--(in)))); casecase 5: executed 1 time by 1 test: case 4: Executed by:
code before this statement never executed: case 4: executed 1 time by 1 test: 4:case 4: Executed by:
code before this statement never executed: case 4: executed 1 time by 1 test: tin0 =((DES_LONG)(*(--(in))))<<24L; casecase 4: Executed by:
never executed: case 3: code before this statement executed 1 time by 1 test: case 3: Executed by:
never executed: 3:case 3: code before this statement executed 1 time by 1 test: case 3: Executed by:
never executed: tin0|=((DES_LONG)(*(--(in))))<<16L; casecase 3: never executed: case 2: code before this statement executed 1 time by 1 test: case 2: Executed by:
never executed: 2:case 2: code before this statement executed 1 time by 1 test: case 2: Executed by:
never executed: tin0|=((DES_LONG)(*(--(in))))<< 8L; casecase 2: executed 1 time by 1 test: 1:case 1: Executed by:
executed 1 time by 1 test: case 1: Executed by:
code before this statement executed 1 time by 1 test: tin0|=((DES_LONG)(*(--(in)))); }case 1: Executed by:
executed 1 time by 1 test: }end of block Executed by:
executed 1 time by 1 test: ;end of block Executed by:
| 0-1 | ||||||
20 | - | |||||||
21 | tin0 ^= tout0; | - | ||||||
22 | tin[0] = tin0; | - | ||||||
23 | tin1 ^= tout1; | - | ||||||
24 | tin[1] = tin1; | - | ||||||
25 | DES_encrypt1((DES_LONG *)tin, schedule, 1); | - | ||||||
26 | tout0 = tin[0]; | - | ||||||
27 | tout1 = tin[1]; | - | ||||||
28 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||
29 | if (out !=
| 0-1 | ||||||
30 | ((void *)0)
| 0-1 | ||||||
31 | ) { | - | ||||||
32 | (*((out)++)=(unsigned char)(((tout0) )&0xff), *((out)++)=(unsigned char)(((tout0)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout0)>>16L)&0xff), *((out)++)=(unsigned char)(((tout0)>>24L)&0xff)); | - | ||||||
33 | (*((out)++)=(unsigned char)(((tout1) )&0xff), *((out)++)=(unsigned char)(((tout1)>> 8L)&0xff), *((out)++)=(unsigned char)(((tout1)>>16L)&0xff), *((out)++)=(unsigned char)(((tout1)>>24L)&0xff)); | - | ||||||
34 | } executed 1 time by 1 test: end of block Executed by:
| 1 | ||||||
35 | tout0 = tin0 = tin1 = tin[0] = tin[1] = 0; | - | ||||||
36 | - | |||||||
37 | - | |||||||
38 | - | |||||||
39 | - | |||||||
40 | tout1 = ((tout1 >> 24L) & 0x000000FF) | - | ||||||
41 | | ((tout1 >> 8L) & 0x0000FF00) | - | ||||||
42 | | ((tout1 << 8L) & 0x00FF0000) | - | ||||||
43 | | ((tout1 << 24L) & 0xFF000000); | - | ||||||
44 | return executed 1 time by 1 test: tout1;return tout1; Executed by:
executed 1 time by 1 test: return tout1; Executed by:
| 1 | ||||||
45 | } | - | ||||||
Switch to Source code | Preprocessed file |