OpenCoverage

v3_pku.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/x509v3/v3_pku.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static int i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method,-
4 PKEY_USAGE_PERIOD *usage, BIO *out, int indent);-
5-
6-
7-
8const X509V3_EXT_METHOD v3_pkey_usage_period = {-
9 .ext_nid = 84,-
10 .ext_flags = 0,-
11 .it = &PKEY_USAGE_PERIOD_it,-
12 .ext_new = -
13 ((void *)0)-
14 ,-
15 .ext_free = -
16 ((void *)0)-
17 ,-
18 .d2i = -
19 ((void *)0)-
20 ,-
21 .i2d = -
22 ((void *)0)-
23 ,-
24 .i2s = -
25 ((void *)0)-
26 ,-
27 .s2i = -
28 ((void *)0)-
29 ,-
30 .i2v = -
31 ((void *)0)-
32 ,-
33 .v2i = -
34 ((void *)0)-
35 ,-
36 .i2r = (X509V3_EXT_I2R)i2r_PKEY_USAGE_PERIOD,-
37 .r2i = -
38 ((void *)0)-
39 ,-
40 .usr_data = -
41 ((void *)0)-
42 ,-
43};-
44-
45static const ASN1_TEMPLATE PKEY_USAGE_PERIOD_seq_tt[] = {-
46 {-
47 .flags = (0x1 << 3)|(0x2<<6) | (0x1),-
48 .tag = 0,-
49 .offset = -
50 __builtin_offsetof (-
51 PKEY_USAGE_PERIOD-
52 , -
53 notBefore-
54 )-
55 ,-
56 .field_name = "notBefore",-
57 .item = &ASN1_GENERALIZEDTIME_it,-
58 },-
59 {-
60 .flags = (0x1 << 3)|(0x2<<6) | (0x1),-
61 .tag = 1,-
62 .offset = -
63 __builtin_offsetof (-
64 PKEY_USAGE_PERIOD-
65 , -
66 notAfter-
67 )-
68 ,-
69 .field_name = "notAfter",-
70 .item = &ASN1_GENERALIZEDTIME_it,-
71 },-
72};-
73-
74const ASN1_ITEM PKEY_USAGE_PERIOD_it = {-
75 .itype = 0x1,-
76 .utype = 16,-
77 .templates = PKEY_USAGE_PERIOD_seq_tt,-
78 .tcount = sizeof(PKEY_USAGE_PERIOD_seq_tt) / sizeof(ASN1_TEMPLATE),-
79 .funcs = -
80 ((void *)0)-
81 ,-
82 .size = sizeof(PKEY_USAGE_PERIOD),-
83 .sname = "PKEY_USAGE_PERIOD",-
84};-
85-
86-
87PKEY_USAGE_PERIOD *-
88d2i_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD **a, const unsigned char **in, long len)-
89{-
90 return
never executed: return (PKEY_USAGE_PERIOD *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &PKEY_USAGE_PERIOD_it);
(PKEY_USAGE_PERIOD *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
never executed: return (PKEY_USAGE_PERIOD *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &PKEY_USAGE_PERIOD_it);
0
91 &PKEY_USAGE_PERIOD_it);
never executed: return (PKEY_USAGE_PERIOD *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &PKEY_USAGE_PERIOD_it);
0
92}-
93-
94int-
95i2d_PKEY_USAGE_PERIOD(PKEY_USAGE_PERIOD *a, unsigned char **out)-
96{-
97 return
never executed: return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKEY_USAGE_PERIOD_it);
ASN1_item_i2d((ASN1_VALUE *)a, out, &PKEY_USAGE_PERIOD_it);
never executed: return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKEY_USAGE_PERIOD_it);
0
98}-
99-
100PKEY_USAGE_PERIOD *-
101PKEY_USAGE_PERIOD_new(void)-
102{-
103 return
never executed: return (PKEY_USAGE_PERIOD *)ASN1_item_new(&PKEY_USAGE_PERIOD_it);
(PKEY_USAGE_PERIOD *)ASN1_item_new(&PKEY_USAGE_PERIOD_it);
never executed: return (PKEY_USAGE_PERIOD *)ASN1_item_new(&PKEY_USAGE_PERIOD_it);
0
104}-
105-
106void-
107PKEY_USAGE_PERIOD_free(PKEY_USAGE_PERIOD *a)-
108{-
109 ASN1_item_free((ASN1_VALUE *)a, &PKEY_USAGE_PERIOD_it);-
110}
executed 1 time by 1 test: end of block
Executed by:
  • freenull
1
111-
112static int-
113i2r_PKEY_USAGE_PERIOD(X509V3_EXT_METHOD *method, PKEY_USAGE_PERIOD *usage,-
114 BIO *out, int indent)-
115{-
116 BIO_printf(out, "%*s", indent, "");-
117 if (usage->notBefore
usage->notBeforeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
118 BIO_write(out, "Not Before: ", 12);-
119 ASN1_GENERALIZEDTIME_print(out, usage->notBefore);-
120 if (usage->notAfter
usage->notAfterDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
121 BIO_write(out, ", ", 2);
never executed: BIO_write(out, ", ", 2);
0
122 }
never executed: end of block
0
123 if (usage->notAfter
usage->notAfterDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
124 BIO_write(out, "Not After: ", 11);-
125 ASN1_GENERALIZEDTIME_print(out, usage->notAfter);-
126 }
never executed: end of block
0
127 return
never executed: return 1;
1;
never executed: return 1;
0
128}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.2