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.pba.rbac.x509; |
47 |
|
|
48 |
|
import java.math.BigInteger; |
49 |
|
|
50 |
|
import issrg.pba.repository.UserEntry; |
51 |
|
import issrg.pba.rbac.LDAPDNPrincipal; |
52 |
|
import issrg.utils.repository.Entry; |
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
@author |
57 |
|
|
|
|
| 38.5% |
Uncovered Elements: 24 (39) |
Complexity: 7 |
Complexity Density: 0.57 |
|
58 |
|
public class ACUserEntry extends UserEntry{ |
59 |
|
|
|
|
| 66.7% |
Uncovered Elements: 6 (18) |
Complexity: 5 |
Complexity Density: 0.42 |
|
60 |
1779
|
protected void _init_(issrg.ac.AttributeCertificate user){... |
61 |
1779
|
try{ |
62 |
1779
|
LDAPDNPrincipal subject= null; |
63 |
1779
|
LDAPDNPrincipal issuer=null; |
64 |
1779
|
BigInteger serial=null; |
65 |
|
|
66 |
1779
|
if(user.getACInfo().getHolder().getEntityName()!=null) |
67 |
1779
|
subject = new LDAPDNPrincipal(issrg.ac.Util.generalNamesToString(user.getACInfo().getHolder().getEntityName())); |
68 |
1779
|
if(user.getACInfo().getHolder().getBaseCertificateID()!=null) |
69 |
0
|
issuer =new LDAPDNPrincipal(issrg.ac.Util.generalNamesToString(user.getACInfo().getHolder().getBaseCertificateID().getIssuer())); |
70 |
1779
|
if(user.getACInfo().getHolder().getBaseCertificateID()!=null) |
71 |
0
|
serial = user.getACInfo().getHolder().getBaseCertificateID().getSerial(); |
72 |
|
|
73 |
1779
|
super._init_(subject, issuer,serial); |
74 |
|
|
75 |
|
}catch (issrg.utils.RFC2253ParsingException rpe){ |
76 |
0
|
throw new java.lang.IllegalArgumentException(rpe.getMessage()); |
77 |
|
} |
78 |
|
} |
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
0
|
public ACUserEntry(java.security.Principal subject){... |
84 |
0
|
super(subject); |
85 |
|
} |
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
|
|
| 0% |
Uncovered Elements: 3 (3) |
Complexity: 2 |
Complexity Density: 0.67 |
|
90 |
0
|
public ACUserEntry(Object ac) {... |
91 |
0
|
try{ |
92 |
0
|
_init_(issrg.ac.AttributeCertificate.guessEncoding((byte[])ac)); |
93 |
|
}catch (Exception e){ |
94 |
0
|
throw new IllegalArgumentException(e.getMessage()); |
95 |
|
} |
96 |
|
} |
97 |
|
|
98 |
|
|
99 |
|
|
100 |
|
|
101 |
|
|
102 |
|
@param |
103 |
|
|
104 |
|
|
105 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 2 |
Complexity Density: 0.67 |
|
106 |
0
|
public ACUserEntry(issrg.ac.V2Form user){... |
107 |
0
|
try{ |
108 |
0
|
_init_(user.getIssuerName()!=null |
109 |
|
?new LDAPDNPrincipal( |
110 |
|
issrg.ac.Util.generalNamesToString(user.getIssuerName()) |
111 |
|
) |
112 |
|
:null, |
113 |
0
|
user.getBaseCertificateID()!=null |
114 |
|
?new LDAPDNPrincipal( |
115 |
|
issrg.ac.Util.generalNamesToString(user.getBaseCertificateID().getIssuer()) |
116 |
|
) |
117 |
|
:null, |
118 |
0
|
user.getBaseCertificateID()!=null |
119 |
|
?user.getBaseCertificateID().getSerial() |
120 |
|
:null |
121 |
|
); |
122 |
|
}catch (issrg.utils.RFC2253ParsingException rpe){ |
123 |
0
|
throw new java.lang.IllegalArgumentException(rpe.getMessage()); |
124 |
|
} |
125 |
|
} |
126 |
|
|
127 |
|
|
128 |
|
|
129 |
|
|
130 |
|
|
131 |
|
@param |
132 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
133 |
1779
|
public ACUserEntry(issrg.ac.AttributeCertificate user){... |
134 |
1779
|
_init_(user); |
135 |
|
} |
136 |
|
|
137 |
|
|
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
@param |
142 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
143 |
0
|
public ACUserEntry(java.security.cert.X509Certificate cert){... |
144 |
0
|
_init_(cert.getSubjectDN(), cert.getIssuerDN(), cert.getSerialNumber()); |
145 |
|
} |
146 |
|
} |