1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
package issrg.ac.attributes; |
47 |
|
import iaik.asn1.*; |
48 |
|
import iaik.asn1.structures.*; |
49 |
|
import iaik.utils.RFC2253NameParser; |
50 |
|
import iaik.utils.RFC2253NameParserException; |
51 |
|
import issrg.utils.RFC2253ParsingException; |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@author |
57 |
|
|
|
|
| 48.3% |
Uncovered Elements: 15 (29) |
Complexity: 2 |
Complexity Density: 0.76 |
|
58 |
|
public class IssuedOnBehalfOf extends issrg.ac.Extension implements Cloneable { |
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
public static final String ISSUED_ON_BEHALF_OF_OID = "2.5.29.64"; |
65 |
|
private GeneralName iobo; |
66 |
|
private String issuerDN; |
67 |
|
|
68 |
|
|
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
19
|
public static void registerMe() {... |
75 |
19
|
issrg.ac.Extensions.registerExtension(ISSUED_ON_BEHALF_OF_OID, IssuedOnBehalfOf.class); |
76 |
|
} |
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
@param |
83 |
|
|
84 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
85 |
0
|
public IssuedOnBehalfOf(IssuedOnBehalfOf e) throws iaik.asn1.CodingException {... |
86 |
0
|
super(ISSUED_ON_BEHALF_OF_OID, e.isCritical(), e.getExtensionValue()); |
87 |
|
} |
88 |
|
|
89 |
|
|
90 |
|
|
91 |
|
@param |
92 |
|
|
93 |
|
@param |
94 |
|
@return |
95 |
|
|
96 |
|
|
97 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
98 |
20
|
public IssuedOnBehalfOf (boolean critical, iaik.asn1.structures.GeneralName iobo) {... |
99 |
20
|
super(ISSUED_ON_BEHALF_OF_OID, critical); |
100 |
20
|
setIssuedOnBehalfOf(iobo); |
101 |
|
} |
102 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
103 |
0
|
public Object clone(){... |
104 |
0
|
try { |
105 |
0
|
return new IssuedOnBehalfOf(this); |
106 |
|
} catch (iaik.asn1.CodingException ce) { |
107 |
0
|
return null; |
108 |
|
} |
109 |
|
} |
110 |
|
|
111 |
|
|
112 |
|
|
113 |
|
@param |
114 |
|
|
115 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
116 |
538
|
public IssuedOnBehalfOf(ASN1Object ao) throws CodingException{... |
117 |
538
|
super(ao); |
118 |
|
} |
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
|
123 |
|
|
124 |
|
@return |
125 |
|
|
126 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
127 |
40
|
public ASN1Object encodeValue() throws CodingException{... |
128 |
40
|
return iobo.toASN1Object(); |
129 |
|
|
130 |
|
} |
131 |
|
|
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
|
136 |
|
@param |
137 |
|
|
138 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
139 |
538
|
public void decodeValue(ASN1Object ao) throws CodingException {... |
140 |
538
|
setIssuedOnBehalfOf(new GeneralName(ao)); |
141 |
|
} |
142 |
|
|
143 |
|
|
144 |
|
|
145 |
|
|
146 |
|
|
147 |
|
@param |
148 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
149 |
558
|
public void setIssuedOnBehalfOf(GeneralName gn){... |
150 |
558
|
iobo=gn; |
151 |
558
|
issuerDN=((Name)iobo.getName()).getName(); |
152 |
|
} |
153 |
|
|
154 |
|
|
155 |
|
|
156 |
|
|
157 |
|
@param |
158 |
|
|
159 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
160 |
0
|
public void setIssuerDN(String dn) throws iaik.utils.RFC2253NameParserException{... |
161 |
0
|
issuerDN=dn; |
162 |
0
|
iobo=new GeneralName(GeneralName.directoryName, new iaik.utils.RFC2253NameParser(dn).parse()); |
163 |
|
} |
164 |
|
|
165 |
|
|
166 |
|
|
167 |
|
@return |
168 |
|
|
169 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
170 |
0
|
public String getIssuerDN() {... |
171 |
0
|
return issuerDN; |
172 |
|
} |
173 |
|
|
174 |
|
|
175 |
|
|
176 |
|
@return |
177 |
|
|
178 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
179 |
0
|
public GeneralName getIssuedOnBehalfOf(){... |
180 |
0
|
return iobo; |
181 |
|
} |
182 |
|
|
183 |
|
|
184 |
|
|
185 |
|
|
186 |
|
@return |
187 |
|
|
188 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
189 |
0
|
public String extensionValueToString(String indent){... |
190 |
0
|
return "IssuedOnBehalfOf "+issuerDN; |
191 |
|
} |
192 |
|
} |