168 |
168 |
169 /** |
169 /** |
170 * Returns the ASN.1 DER-encoded form of this CRL. |
170 * Returns the ASN.1 DER-encoded form of this CRL. |
171 * |
171 * |
172 * @return the encoded form of this certificate |
172 * @return the encoded form of this certificate |
173 * @exception CRLException if an encoding error occurs. |
173 * @throws CRLException if an encoding error occurs. |
174 */ |
174 */ |
175 public abstract byte[] getEncoded() |
175 public abstract byte[] getEncoded() |
176 throws CRLException; |
176 throws CRLException; |
177 |
177 |
178 /** |
178 /** |
179 * Verifies that this CRL was signed using the |
179 * Verifies that this CRL was signed using the |
180 * private key that corresponds to the given public key. |
180 * private key that corresponds to the given public key. |
181 * |
181 * |
182 * @param key the PublicKey used to carry out the verification. |
182 * @param key the PublicKey used to carry out the verification. |
183 * |
183 * |
184 * @exception NoSuchAlgorithmException on unsupported signature |
184 * @throws NoSuchAlgorithmException on unsupported signature |
185 * algorithms. |
185 * algorithms. |
186 * @exception InvalidKeyException on incorrect key. |
186 * @throws InvalidKeyException on incorrect key. |
187 * @exception NoSuchProviderException if there's no default provider. |
187 * @throws NoSuchProviderException if there's no default provider. |
188 * @exception SignatureException on signature errors. |
188 * @throws SignatureException on signature errors. |
189 * @exception CRLException on encoding errors. |
189 * @throws CRLException on encoding errors. |
190 */ |
190 */ |
191 public abstract void verify(PublicKey key) |
191 public abstract void verify(PublicKey key) |
192 throws CRLException, NoSuchAlgorithmException, |
192 throws CRLException, NoSuchAlgorithmException, |
193 InvalidKeyException, NoSuchProviderException, |
193 InvalidKeyException, NoSuchProviderException, |
194 SignatureException; |
194 SignatureException; |
200 * supplied by the given provider. |
200 * supplied by the given provider. |
201 * |
201 * |
202 * @param key the PublicKey used to carry out the verification. |
202 * @param key the PublicKey used to carry out the verification. |
203 * @param sigProvider the name of the signature provider. |
203 * @param sigProvider the name of the signature provider. |
204 * |
204 * |
205 * @exception NoSuchAlgorithmException on unsupported signature |
205 * @throws NoSuchAlgorithmException on unsupported signature |
206 * algorithms. |
206 * algorithms. |
207 * @exception InvalidKeyException on incorrect key. |
207 * @throws InvalidKeyException on incorrect key. |
208 * @exception NoSuchProviderException on incorrect provider. |
208 * @throws NoSuchProviderException on incorrect provider. |
209 * @exception SignatureException on signature errors. |
209 * @throws SignatureException on signature errors. |
210 * @exception CRLException on encoding errors. |
210 * @throws CRLException on encoding errors. |
211 */ |
211 */ |
212 public abstract void verify(PublicKey key, String sigProvider) |
212 public abstract void verify(PublicKey key, String sigProvider) |
213 throws CRLException, NoSuchAlgorithmException, |
213 throws CRLException, NoSuchAlgorithmException, |
214 InvalidKeyException, NoSuchProviderException, |
214 InvalidKeyException, NoSuchProviderException, |
215 SignatureException; |
215 SignatureException; |
227 * and it provides a default implementation. |
227 * and it provides a default implementation. |
228 * |
228 * |
229 * @param key the PublicKey used to carry out the verification. |
229 * @param key the PublicKey used to carry out the verification. |
230 * @param sigProvider the signature provider. |
230 * @param sigProvider the signature provider. |
231 * |
231 * |
232 * @exception NoSuchAlgorithmException on unsupported signature |
232 * @throws NoSuchAlgorithmException on unsupported signature |
233 * algorithms. |
233 * algorithms. |
234 * @exception InvalidKeyException on incorrect key. |
234 * @throws InvalidKeyException on incorrect key. |
235 * @exception SignatureException on signature errors. |
235 * @throws SignatureException on signature errors. |
236 * @exception CRLException on encoding errors. |
236 * @throws CRLException on encoding errors. |
237 * @since 1.8 |
237 * @since 1.8 |
238 */ |
238 */ |
239 public void verify(PublicKey key, Provider sigProvider) |
239 public void verify(PublicKey key, Provider sigProvider) |
240 throws CRLException, NoSuchAlgorithmException, |
240 throws CRLException, NoSuchAlgorithmException, |
241 InvalidKeyException, SignatureException { |
241 InvalidKeyException, SignatureException { |
381 * |
381 * |
382 * @param certificate the certificate for which a CRL entry is to be looked |
382 * @param certificate the certificate for which a CRL entry is to be looked |
383 * up |
383 * up |
384 * @return the entry for the given certificate, or null if no such entry |
384 * @return the entry for the given certificate, or null if no such entry |
385 * exists in this CRL. |
385 * exists in this CRL. |
386 * @exception NullPointerException if certificate is null |
386 * @throws NullPointerException if certificate is null |
387 * |
387 * |
388 * @since 1.5 |
388 * @since 1.5 |
389 */ |
389 */ |
390 public X509CRLEntry getRevokedCertificate(X509Certificate certificate) { |
390 public X509CRLEntry getRevokedCertificate(X509Certificate certificate) { |
391 X500Principal certIssuer = certificate.getIssuerX500Principal(); |
391 X500Principal certIssuer = certificate.getIssuerX500Principal(); |
409 * Gets the DER-encoded CRL information, the |
409 * Gets the DER-encoded CRL information, the |
410 * {@code tbsCertList} from this CRL. |
410 * {@code tbsCertList} from this CRL. |
411 * This can be used to verify the signature independently. |
411 * This can be used to verify the signature independently. |
412 * |
412 * |
413 * @return the DER-encoded CRL information. |
413 * @return the DER-encoded CRL information. |
414 * @exception CRLException if an encoding error occurs. |
414 * @throws CRLException if an encoding error occurs. |
415 */ |
415 */ |
416 public abstract byte[] getTBSCertList() throws CRLException; |
416 public abstract byte[] getTBSCertList() throws CRLException; |
417 |
417 |
418 /** |
418 /** |
419 * Gets the {@code signature} value (the raw signature bits) from |
419 * Gets the {@code signature} value (the raw signature bits) from |