11package io .calidog .certstream ;
22
3- import sun .reflect .generics .reflectiveObjects .NotImplementedException ;
4-
53import javax .security .auth .x500 .X500Principal ;
64import java .math .BigInteger ;
75import java .security .*;
8- import java .security .cert .Certificate ;
96import java .security .cert .*;
107import java .time .Instant ;
118import java .util .*;
1613 */
1714public class CertStreamCertificate extends X509Certificate {
1815 private HashMap <String , String > subject ;
19- private HashMap <String , String > extensions ;
16+ private HashMap <String , String [] > extensions ;
2017
2118 private double notBefore ;
2219 private double notAfter ;
@@ -77,25 +74,25 @@ public void checkValidity(Date date) throws CertificateExpiredException, Certifi
7774 /**Not implemented*/
7875 @ Override
7976 public int getVersion () {
80- throw new NotImplementedException ();
77+ throw new UnsupportedOperationException ();
8178 }
8279
8380 /**Not implemented*/
8481 @ Override
8582 public BigInteger getSerialNumber () {
86- throw new NotImplementedException ();
83+ throw new UnsupportedOperationException ();
8784 }
8885
8986 /**Not implemented*/
9087 @ Override
9188 public Principal getIssuerDN () {
92- throw new NotImplementedException ();
89+ throw new UnsupportedOperationException ();
9390 }
9491
9592 /**Not implemented*/
9693 @ Override
9794 public X500Principal getIssuerX500Principal () {
98- throw new NotImplementedException ();
95+ throw new UnsupportedOperationException ();
9996 }
10097
10198 /**Not implemented*/
@@ -122,66 +119,66 @@ public Date getNotAfter() {
122119 /**Not implemented*/
123120 @ Override
124121 public byte [] getTBSCertificate () throws CertificateEncodingException {
125- throw new NotImplementedException ();
122+ throw new UnsupportedOperationException ();
126123 }
127124 /**Not implemented*/
128125 @ Override
129126 public byte [] getSignature () {
130- throw new NotImplementedException ();
127+ throw new UnsupportedOperationException ();
131128 }
132129
133130 /**Not implemented*/
134131 @ Override
135132 public String getSigAlgName () {
136- throw new NotImplementedException ();
133+ throw new UnsupportedOperationException ();
137134 }
138135
139136 /**Not implemented*/
140137 @ Override
141138 public String getSigAlgOID () {
142- throw new NotImplementedException ();
139+ throw new UnsupportedOperationException ();
143140 }
144141
145142 /**Not implemented*/
146143 @ Override
147144 public byte [] getSigAlgParams () {
148- throw new NotImplementedException ();
145+ throw new UnsupportedOperationException ();
149146 }
150147
151148 /**Not implemented*/
152149 @ Override
153150 public boolean [] getIssuerUniqueID () {
154- throw new NotImplementedException ();
151+ throw new UnsupportedOperationException ();
155152 }
156153
157154 /**Not implemented*/
158155 @ Override
159156 public boolean [] getSubjectUniqueID () {
160- throw new NotImplementedException ();
157+ throw new UnsupportedOperationException ();
161158 }
162159
163160 /**Not implemented*/
164161 @ Override
165162 public boolean [] getKeyUsage () {
166- throw new NotImplementedException ();
163+ throw new UnsupportedOperationException ();
167164 }
168165
169166 /**Not implemented*/
170167 @ Override
171168 public List <String > getExtendedKeyUsage () throws CertificateParsingException {
172- throw new NotImplementedException ();
169+ throw new UnsupportedOperationException ();
173170 }
174171
175172 /**Not implemented*/
176173 @ Override
177174 public int getBasicConstraints () {
178- throw new NotImplementedException ();
175+ throw new UnsupportedOperationException ();
179176 }
180177
181178 /**Not implemented*/
182179 @ Override
183180 public Collection <List <?>> getSubjectAlternativeNames () throws CertificateParsingException {
184- throw new NotImplementedException ();
181+ throw new UnsupportedOperationException ();
185182 }
186183
187184 @ Override
@@ -206,49 +203,49 @@ public byte[] getEncoded() throws CertificateEncodingException {
206203 /**Not implemented*/
207204 @ Override
208205 public void verify (PublicKey publicKey ) throws CertificateException , NoSuchAlgorithmException , InvalidKeyException , NoSuchProviderException , SignatureException {
209- throw new NotImplementedException ();
206+ throw new UnsupportedOperationException ();
210207 }
211208
212209 /**Not implemented*/
213210 @ Override
214211 public void verify (PublicKey publicKey , String s ) throws CertificateException , NoSuchAlgorithmException , InvalidKeyException , NoSuchProviderException , SignatureException {
215- throw new NotImplementedException ();
212+ throw new UnsupportedOperationException ();
216213 }
217214
218215 /**Not implemented*/
219216 @ Override
220217 public String toString () {
221- throw new NotImplementedException ();
218+ throw new UnsupportedOperationException ();
222219 }
223220
224221 /**Not implemented*/
225222 @ Override
226223 public PublicKey getPublicKey () {
227- throw new NotImplementedException ();
224+ throw new UnsupportedOperationException ();
228225 }
229226
230227 /**Not implemented*/
231228 @ Override
232229 public boolean hasUnsupportedCriticalExtension () {
233- throw new NotImplementedException ();
230+ throw new UnsupportedOperationException ();
234231 }
235232
236233 /**Not implemented*/
237234 @ Override
238235 public Set <String > getCriticalExtensionOIDs () {
239- throw new NotImplementedException ();
236+ throw new UnsupportedOperationException ();
240237 }
241238
242239 /**Not implemented*/
243240 @ Override
244241 public Set <String > getNonCriticalExtensionOIDs () {
245- throw new NotImplementedException ();
242+ throw new UnsupportedOperationException ();
246243 }
247244
248245 /**Not implemented*/
249246 @ Override
250247 public byte [] getExtensionValue (String s ) {
251- throw new NotImplementedException ();
248+ throw new UnsupportedOperationException ();
252249 }
253250
254251 /**
@@ -257,7 +254,7 @@ public byte[] getExtensionValue(String s) {
257254 * passed-in oid String. The oid string is represented
258255 * by whatever CertStream passes us.
259256 */
260- public String getStringExtensionValue (String key )
257+ public String [] getStringExtensionValue (String key )
261258 {
262259 return extensions .get (key );
263260 }
0 commit comments