|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.KSSLCertificate
public class KSSLCertificate
KDE X.509 Certificate This class represents an X.509 (SSL) certificate. Note: this object is VERY HEAVY TO COPY. Please try to use reference or pointer whenever possible
KSSL
Field Summary | |
---|---|
static int |
Any
|
static int |
ErrorReadingRoot
|
static int |
Expired
|
static int |
InvalidCA
|
static int |
InvalidHost
|
static int |
InvalidPurpose
|
static int |
Irrelevant
|
static int |
NoCARoot
|
static int |
None
|
static int |
NoSSL
|
static int |
Ok
|
static int |
PathLengthExceeded
|
static int |
PrivateKeyFailed
|
static int |
Rejected
|
static int |
Revoked
|
static int |
SelfSigned
|
static int |
SelfSignedChain
|
static int |
SignatureFailed
|
static int |
SMIMEEncrypt
|
static int |
SMIMESign
|
static int |
SSLClient
|
static int |
SSLServer
|
static int |
Unknown
A CA certificate can be validated as Irrelevant when it was not used to sign any other relevant certificate. |
static int |
Untrusted
|
Constructor Summary | |
---|---|
|
KSSLCertificate()
|
protected |
KSSLCertificate(java.lang.Class dummy)
|
|
KSSLCertificate(KSSLCertificate x)
Copy constructor. |
Method Summary | |
---|---|
KSSLCertChain |
chain()
Get a reference to the certificate chain. |
void |
dispose()
Delete the wrapped C++ instance ahead of finalize() |
protected void |
finalize()
Deletes the wrapped C++ instance |
static KSSLCertificate |
fromString(java.lang.String cert)
Create an X.509 certificate from a base64 encoded string. |
void |
getEmails(java.lang.String[] to)
FIXME: document |
java.lang.String |
getIssuer()
Get the issuer of the certificate (X.509 map). |
java.lang.String |
getKDEKey()
KDEKey is a concatenation "Subject (MD5)", mostly needed for SMIME. |
java.lang.String |
getKeyType()
Get the key type (RSA, DSA, etc). |
java.lang.String |
getMD5Digest()
Get the MD5 digest of the certificate. |
static java.lang.String |
getMD5DigestFromKDEKey(java.lang.String k)
Aegypten semantics force us to search by MD5Digest only. |
java.lang.String |
getMD5DigestText()
Get the MD5 digest of the certificate. |
java.lang.String |
getNotAfter()
Get the date that the certificate is valid until. |
java.lang.String |
getNotBefore()
Get the date that the certificate becomes valid on. |
java.lang.String |
getPublicKeyText()
Get the public key. |
java.util.Calendar |
getQDTNotAfter()
Get the date that the certificate is valid until. |
java.util.Calendar |
getQDTNotBefore()
Get the date that the certificate becomes valid on. |
java.lang.String |
getSerialNumber()
Get the serial number of the certificate. |
java.lang.String |
getSignatureText()
Get the signature. |
java.lang.String |
getSubject()
Get the subject of the certificate (X.509 map). |
boolean |
isDisposed()
Has the wrapped C++ instance been deleted? |
boolean |
isSigner()
Check if this is a signer certificate. |
boolean |
isValid()
Check if this is a valid certificate. |
boolean |
isValid(int p)
Check if this is a valid certificate. |
protected int |
processError(int ec)
|
KSSLCertificate |
replicate()
Explicitly make a copy of this certificate. |
int |
revalidate()
Check if this is a valid certificate. |
int |
revalidate(int p)
Check if this is a valid certificate. |
boolean |
setCert(java.lang.StringBuffer cert)
Re-set the certificate from a base64 string. |
java.util.ArrayList |
subjAltNames()
The alternate subject name. |
byte[] |
toDer()
Convert the certificate to DER (ASN.1) format. |
byte[] |
toNetscape()
Convert the certificate to Netscape format. |
byte[] |
toPem()
Convert the certificate to PEM (base64) format. |
java.lang.String |
toString()
Convert this certificate to a string. |
java.lang.String |
toText()
Convert the certificate to OpenSSL plain text format. |
int |
validate()
Check if this is a valid certificate. |
int |
validate(int p)
Check if this is a valid certificate. |
static java.lang.String |
verifyText(int x)
Obtain the localized message that corresponds to a validation result. |
KSSLX509V3 |
x509V3Extensions()
Access the X.509v3 parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int Unknown
public static final int Ok
public static final int NoCARoot
public static final int InvalidPurpose
public static final int PathLengthExceeded
public static final int InvalidCA
public static final int Expired
public static final int SelfSigned
public static final int ErrorReadingRoot
public static final int NoSSL
public static final int Revoked
public static final int Untrusted
public static final int SignatureFailed
public static final int Rejected
public static final int PrivateKeyFailed
public static final int InvalidHost
public static final int Irrelevant
public static final int SelfSignedChain
public static final int None
public static final int SSLServer
public static final int SSLClient
public static final int SMIMESign
public static final int SMIMEEncrypt
public static final int Any
Constructor Detail |
---|
protected KSSLCertificate(java.lang.Class dummy)
public KSSLCertificate(KSSLCertificate x)
x
- the object to copy frompublic KSSLCertificate()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSubject()
public java.lang.String getIssuer()
public java.lang.String getNotBefore()
public java.lang.String getNotAfter()
public java.util.Calendar getQDTNotBefore()
public java.util.Calendar getQDTNotAfter()
public byte[] toDer()
public byte[] toPem()
public byte[] toNetscape()
public java.lang.String toText()
public java.lang.String getSerialNumber()
public java.lang.String getKeyType()
public java.lang.String getPublicKeyText()
public java.lang.String getMD5DigestText()
public java.lang.String getMD5Digest()
public java.lang.String getSignatureText()
public boolean isValid()
public boolean isValid(int p)
p
- the purpose to validate for
public java.util.ArrayList subjAltNames()
public int validate()
public int validate(int p)
p
- the purpose to validate for
public int revalidate()
public int revalidate(int p)
p
- the purpose to validate for
public KSSLCertChain chain()
public KSSLCertificate replicate()
public boolean setCert(java.lang.StringBuffer cert)
cert
- the certificate to set to
public KSSLX509V3 x509V3Extensions()
KSSLX509V3
public boolean isSigner()
public void getEmails(java.lang.String[] to)
public java.lang.String getKDEKey()
public static KSSLCertificate fromString(java.lang.String cert)
cert
- the certificate in base64 form
public static java.lang.String verifyText(int x)
x
- the code to look up
public static java.lang.String getMD5DigestFromKDEKey(java.lang.String k)
protected int processError(int ec)
protected void finalize() throws java.lang.InternalError
finalize
in class java.lang.Object
java.lang.InternalError
public void dispose()
public boolean isDisposed()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |