| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/a_gentm.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | int asn1_generalizedtime_to_tm(struct tm *tm, const ASN1_GENERALIZEDTIME *d) | - | ||||||||||||
| 4 | { | - | ||||||||||||
| 5 | - | |||||||||||||
| 6 | if (d->type != 24
| 0-2477 | ||||||||||||
| 7 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 8 | return executed 2477 times by 1 test: asn1_time_to_tm(tm, d);return asn1_time_to_tm(tm, d);Executed by:
executed 2477 times by 1 test: return asn1_time_to_tm(tm, d);Executed by:
| 2477 | ||||||||||||
| 9 | } | - | ||||||||||||
| 10 | - | |||||||||||||
| 11 | int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d) | - | ||||||||||||
| 12 | { | - | ||||||||||||
| 13 | return executed 2477 times by 1 test: asn1_generalizedtime_to_tm(return asn1_generalizedtime_to_tm( ((void *)0) , d);Executed by:
executed 2477 times by 1 test: return asn1_generalizedtime_to_tm( ((void *)0) , d);Executed by:
| 2477 | ||||||||||||
| 14 | ((void *)0) executed 2477 times by 1 test: return asn1_generalizedtime_to_tm( ((void *)0) , d);Executed by:
| 2477 | ||||||||||||
| 15 | , d); executed 2477 times by 1 test: return asn1_generalizedtime_to_tm( ((void *)0) , d);Executed by:
| 2477 | ||||||||||||
| 16 | } | - | ||||||||||||
| 17 | - | |||||||||||||
| 18 | int 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)
| 534-1887 | ||||||||||||
| 28 | return executed 534 times by 1 test: 0;return 0;Executed by:
executed 534 times by 1 test: return 0;Executed by:
| 534 | ||||||||||||
| 29 | - | |||||||||||||
| 30 | if (s !=
| 0-1887 | ||||||||||||
| 31 | ((void *)0)
| 0-1887 | ||||||||||||
| 32 | && !ASN1_STRING_copy(s, &t)
| 0-1887 | ||||||||||||
| 33 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 34 | - | |||||||||||||
| 35 | return executed 1887 times by 1 test: 1;return 1;Executed by:
executed 1887 times by 1 test: return 1;Executed by:
| 1887 | ||||||||||||
| 36 | } | - | ||||||||||||
| 37 | - | |||||||||||||
| 38 | ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, | - | ||||||||||||
| 39 | time_t t) | - | ||||||||||||
| 40 | { | - | ||||||||||||
| 41 | return never executed: ASN1_GENERALIZEDTIME_adj(s, t, 0, 0);return ASN1_GENERALIZEDTIME_adj(s, t, 0, 0);never executed: return ASN1_GENERALIZEDTIME_adj(s, t, 0, 0); | 0 | ||||||||||||
| 42 | } | - | ||||||||||||
| 43 | - | |||||||||||||
| 44 | ASN1_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 ==
| 0-2340 | ||||||||||||
| 53 | ((void *)0)
| 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
| 257-1541 | ||||||||||||
| 60 | if (!OPENSSL_gmtime_adj(ts, offset_day, offset_sec)
| 534-1549 | ||||||||||||
| 61 | return executed 534 times by 1 test: return ((void *)0) ;Executed by:
executed 534 times by 1 test: return ((void *)0) ;Executed by:
| 534 | ||||||||||||
| 62 | ((void *)0) executed 534 times by 1 test: return ((void *)0) ;Executed by:
| 534 | ||||||||||||
| 63 | ; executed 534 times by 1 test: return ((void *)0) ;Executed by:
| 534 | ||||||||||||
| 64 | } executed 1549 times by 1 test: end of blockExecuted by:
| 1549 | ||||||||||||
| 65 | - | |||||||||||||
| 66 | return executed 1806 times by 1 test: asn1_time_from_tm(s, ts, 24);return asn1_time_from_tm(s, ts, 24);Executed by:
executed 1806 times by 1 test: return asn1_time_from_tm(s, ts, 24);Executed by:
| 1806 | ||||||||||||
| 67 | } | - | ||||||||||||
| 68 | - | |||||||||||||
| 69 | int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm) | - | ||||||||||||
| 70 | { | - | ||||||||||||
| 71 | if (tm->type != 24
| 0-9486 | ||||||||||||
| 72 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 73 | return executed 9486 times by 1 test: ASN1_TIME_print(bp, tm);return ASN1_TIME_print(bp, tm);Executed by:
executed 9486 times by 1 test: return ASN1_TIME_print(bp, tm);Executed by:
| 9486 | ||||||||||||
| 74 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |