1 7 8 package java.security.cert; 9 10 import java.math.BigInteger ; 11 import java.security.Principal ; 12 import java.security.PublicKey ; 13 import java.util.Collection ; 14 import java.util.Date ; 15 import java.util.List ; 16 import javax.security.auth.x500.X500Principal ; 17 18 import sun.security.x509.X509CertImpl; 19 20 89 90 public abstract class X509Certificate extends Certificate 91 implements X509Extension { 92 93 private static final long serialVersionUID = -2491127588187038216L; 94 95 private transient X500Principal subjectX500Principal, issuerX500Principal; 96 97 100 protected X509Certificate() { 101 super("X.509"); 102 } 103 104 127 public abstract void checkValidity() 128 throws CertificateExpiredException , CertificateNotYetValidException ; 129 130 145 public abstract void checkValidity(Date date) 146 throws CertificateExpiredException , CertificateNotYetValidException ; 147 148 158 public abstract int getVersion(); 159 160 175 public abstract BigInteger getSerialNumber(); 176 177 216 public abstract Principal getIssuerDN(); 217 218 228 public X500Principal getIssuerX500Principal() { 229 if (issuerX500Principal == null) { 230 issuerX500Principal = X509CertImpl.getIssuerX500Principal(this); 231 } 232 return issuerX500Principal; 233 } 234 235 257 public abstract Principal getSubjectDN(); 258 259 271 public X500Principal getSubjectX500Principal() { 272 if (subjectX500Principal == null) { 273 subjectX500Principal = X509CertImpl.getSubjectX500Principal(this); 274 } 275 return subjectX500Principal; 276 } 277 278 296 public abstract Date getNotBefore(); 297 298 306 public abstract Date getNotAfter(); 307 308 316 public abstract byte[] getTBSCertificate() 317 throws CertificateEncodingException ; 318 319 329 public abstract byte[] getSignature(); 330 331 350 public abstract String getSigAlgName(); 351 352 364 public abstract String getSigAlgOID(); 365 366 382 public abstract byte[] getSigAlgParams(); 383 384 402 public abstract boolean[] getIssuerUniqueID(); 403 404 416 public abstract boolean[] getSubjectUniqueID(); 417 418 448 public abstract boolean[] getKeyUsage(); 449 450 482 public List <String > getExtendedKeyUsage() throws CertificateParsingException { 483 return X509CertImpl.getExtendedKeyUsage(this); 484 } 485 486 518 public abstract int getBasicConstraints(); 519 520 580 public Collection <List <?>> getSubjectAlternativeNames() 581 throws CertificateParsingException { 582 return X509CertImpl.getSubjectAlternativeNames(this); 583 } 584 585 622 public Collection <List <?>> getIssuerAlternativeNames() 623 throws CertificateParsingException { 624 return X509CertImpl.getIssuerAlternativeNames(this); 625 } 626 } 627 | Popular Tags |