OpenCoverage

cbc_cksm.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/des/cbc_cksm.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2DES_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
l > 0Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
; l -= 8) {
1-4
15 if (l >= 8
l >= 8Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
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: end of block
Executed by:
  • libcrypto.so.1.1
else
3
19 { in+=l; tin0=tin1=0; switch (l) { case
never executed: case 8:
8:
never executed: case 8:
tin1 =((DES_LONG)(*(--(in))))<<24L; case
never executed: case 7:
7:
never executed: case 7:
code before this statement never executed: case 7:
tin1|=((DES_LONG)(*(--(in))))<<16L; case
never executed: case 6:
6:
never executed: case 6:
code before this statement never executed: case 6:
tin1|=((DES_LONG)(*(--(in))))<< 8L; case
never executed: case 5:
5:
never executed: case 5:
code before this statement never executed: case 5:
tin1|=((DES_LONG)(*(--(in)))); case
executed 1 time by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
code before this statement never executed: case 4:
executed 1 time by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
4:
code before this statement never executed: case 4:
executed 1 time by 1 test: case 4:
Executed by:
  • libcrypto.so.1.1
tin0 =((DES_LONG)(*(--(in))))<<24L; case
never executed: case 3:
code before this statement executed 1 time by 1 test: case 3:
Executed by:
  • libcrypto.so.1.1
never executed: case 3:
3:
code before this statement executed 1 time by 1 test: case 3:
Executed by:
  • libcrypto.so.1.1
never executed: case 3:
tin0|=((DES_LONG)(*(--(in))))<<16L; case
never executed: case 2:
code before this statement executed 1 time by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
never executed: case 2:
2:
code before this statement executed 1 time by 1 test: case 2:
Executed by:
  • libcrypto.so.1.1
never executed: case 2:
tin0|=((DES_LONG)(*(--(in))))<< 8L; case
executed 1 time by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
1:
executed 1 time by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
code before this statement executed 1 time by 1 test: case 1:
Executed by:
  • libcrypto.so.1.1
tin0|=((DES_LONG)(*(--(in)))); }
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
}
executed 1 time by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
;
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:
  • libcrypto.so.1.1
4
29 if (out !=
out != ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1
30 ((void *)0)
out != ((void *)0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
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:
  • libcrypto.so.1.1
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: return tout1;
Executed by:
  • libcrypto.so.1.1
tout1;
executed 1 time by 1 test: return tout1;
Executed by:
  • libcrypto.so.1.1
1
45}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2