OpenCoverage

a_gentm.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/a_gentm.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3int asn1_generalizedtime_to_tm(struct tm *tm, const ASN1_GENERALIZEDTIME *d)-
4{-
5-
6 if (d->type != 24
d->type != 24Description
TRUEnever evaluated
FALSEevaluated 2477 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-2477
7 return
never executed: return 0;
0;
never executed: return 0;
0
8 return
executed 2477 times by 1 test: return asn1_time_to_tm(tm, d);
Executed by:
  • libcrypto.so.1.1
asn1_time_to_tm(tm, d);
executed 2477 times by 1 test: return asn1_time_to_tm(tm, d);
Executed by:
  • libcrypto.so.1.1
2477
9}-
10-
11int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d)-
12{-
13 return
executed 2477 times by 1 test: return asn1_generalizedtime_to_tm( ((void *)0) , d);
Executed by:
  • libcrypto.so.1.1
asn1_generalizedtime_to_tm(
executed 2477 times by 1 test: return asn1_generalizedtime_to_tm( ((void *)0) , d);
Executed by:
  • libcrypto.so.1.1
2477
14 ((void *)0)
executed 2477 times by 1 test: return asn1_generalizedtime_to_tm( ((void *)0) , d);
Executed by:
  • libcrypto.so.1.1
2477
15 , d);
executed 2477 times by 1 test: return asn1_generalizedtime_to_tm( ((void *)0) , d);
Executed by:
  • libcrypto.so.1.1
2477
16}-
17-
18int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str)-
19{-
20 ASN1_GENERALIZEDTIME t;-
21-
22 t.type = 24;-
23 t.length = strlen(str);-
24 t.data = (unsigned char *)str;-
25 t.flags = 0;-
26-
27 if (!ASN1_GENERALIZEDTIME_check(&t)
!ASN1_GENERALI...TIME_check(&t)Description
TRUEevaluated 534 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1887 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
534-1887
28 return
executed 534 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
0;
executed 534 times by 1 test: return 0;
Executed by:
  • libcrypto.so.1.1
534
29-
30 if (s !=
s != ((void *)0)Description
TRUEevaluated 1887 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1887
31 ((void *)0)
s != ((void *)0)Description
TRUEevaluated 1887 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEnever evaluated
0-1887
32 && !ASN1_STRING_copy(s, &t)
!ASN1_STRING_copy(s, &t)Description
TRUEnever evaluated
FALSEevaluated 1887 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-1887
33 return
never executed: return 0;
0;
never executed: return 0;
0
34-
35 return
executed 1887 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1;
executed 1887 times by 1 test: return 1;
Executed by:
  • libcrypto.so.1.1
1887
36}-
37-
38ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,-
39 time_t t)-
40{-
41 return
never executed: return ASN1_GENERALIZEDTIME_adj(s, t, 0, 0);
ASN1_GENERALIZEDTIME_adj(s, t, 0, 0);
never executed: return ASN1_GENERALIZEDTIME_adj(s, t, 0, 0);
0
42}-
43-
44ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,-
45 time_t t, int offset_day,-
46 long offset_sec)-
47{-
48 struct tm *ts;-
49 struct tm data;-
50-
51 ts = OPENSSL_gmtime(&t, &data);-
52 if (ts ==
ts == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2340 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2340
53 ((void *)0)
ts == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 2340 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
0-2340
54 )-
55 return
never executed: return ((void *)0) ;
never executed: return ((void *)0) ;
0
56 ((void *)0)
never executed: return ((void *)0) ;
0
57 ;
never executed: return ((void *)0) ;
0
58-
59 if (offset_day
offset_dayDescription
TRUEevaluated 1541 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 799 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
|| offset_sec
offset_secDescription
TRUEevaluated 542 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 257 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
) {
257-1541
60 if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec)
!OPENSSL_gmtim...y, offset_sec)Description
TRUEevaluated 534 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
FALSEevaluated 1549 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
534-1549
61 return
executed 534 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
executed 534 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
534
62 ((void *)0)
executed 534 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
534
63 ;
executed 534 times by 1 test: return ((void *)0) ;
Executed by:
  • libcrypto.so.1.1
534
64 }
executed 1549 times by 1 test: end of block
Executed by:
  • libcrypto.so.1.1
1549
65-
66 return
executed 1806 times by 1 test: return asn1_time_from_tm(s, ts, 24);
Executed by:
  • libcrypto.so.1.1
asn1_time_from_tm(s, ts, 24);
executed 1806 times by 1 test: return asn1_time_from_tm(s, ts, 24);
Executed by:
  • libcrypto.so.1.1
1806
67}-
68-
69int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)-
70{-
71 if (tm->type != 24
tm->type != 24Description
TRUEnever evaluated
FALSEevaluated 9486 times by 1 test
Evaluated by:
  • libcrypto.so.1.1
)
0-9486
72 return
never executed: return 0;
0;
never executed: return 0;
0
73 return
executed 9486 times by 1 test: return ASN1_TIME_print(bp, tm);
Executed by:
  • libcrypto.so.1.1
ASN1_TIME_print(bp, tm);
executed 9486 times by 1 test: return ASN1_TIME_print(bp, tm);
Executed by:
  • libcrypto.so.1.1
9486
74}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2