|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.security.cert.Certificate jsdsi.Certificate
A Cert along with its validators (verification path, signature, and online test results). Whereas a Cert is simply an unauthenticated statement, a Certificate is self-validating and thus can be considered authentic if verify() succeeds. A Certificate is serialized as a SPKI/SDSI Sequence.
Cert
,
Signature
,
Sequence
,
Serialized FormNested Class Summary |
Nested classes inherited from class java.security.cert.Certificate |
java.security.cert.Certificate.CertificateRep |
Constructor Summary | |
Certificate(Cert c,
Signature s)
Creates a new Certificate from a given Cert
and Signature . |
|
Certificate(java.security.PublicKey k,
Cert c,
Signature s)
Creates a new Certificate from a given public key,
Cert , and signature. |
Method Summary | |
static Certificate |
fromElements(java.util.Iterator elems)
Factory method for creating a new Certificate from an
iterator that holds a Cert and a Signature . |
static Certificate |
fromSequence(Sequence seq)
Factory method that creates a new Certificate from a
given Sequence that contains a Cert and
a Signature (in this order). |
Cert |
getCert()
|
byte[] |
getEncoded()
|
java.lang.String |
getFormat()
Returns the format of this Certificate , namely
"SEXP" . |
java.security.PublicKey |
getPublicKey()
|
void |
toElements(java.util.List elems)
Adds the issuer (if not null ), the Cert ,
and the Signture of this Certificate to
the given List. |
Sequence |
toSequence()
Returns a Sequence containing the issuer (if not
null ), the Cert , and the
Signature of this Certificate . |
java.lang.String |
toString()
|
void |
verify(java.security.PublicKey key)
|
void |
verify(java.security.PublicKey key,
java.lang.String sigProvider)
|
Methods inherited from class java.security.cert.Certificate |
equals, getType, hashCode, writeReplace |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Certificate(java.security.PublicKey k, Cert c, Signature s) throws java.security.cert.CertificateException
Certificate
from a given public key,
Cert
, and signature.
k
- public key of the issuer (principal).c
- Cert
of this Certificate
.s
- Signature
of this Certificate
.
java.security.cert.CertificateException
- if k
is null
or
not a PublicKey
.public Certificate(Cert c, Signature s) throws java.security.cert.CertificateException
Certificate
from a given Cert
and Signature
.
c
- Cert
to create a new Certificate
from.s
- Signature
to create a new
Certificate
from.
java.security.cert.CertificateException
Method Detail |
public java.security.PublicKey getPublicKey()
Certificate.getPublicKey()
public void verify(java.security.PublicKey key) throws java.security.cert.CertificateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.NoSuchProviderException, java.security.SignatureException
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.NoSuchProviderException
java.security.SignatureException
Certificate.verify(PublicKey)
public void verify(java.security.PublicKey key, java.lang.String sigProvider) throws java.security.cert.CertificateException, java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, java.security.NoSuchProviderException, java.security.SignatureException
java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.InvalidKeyException
java.security.NoSuchProviderException
java.security.SignatureException
Certificate.verify(PublicKey, String)
public Cert getCert()
Cert
of this Certificate
.public static Certificate fromElements(java.util.Iterator elems) throws java.security.cert.CertificateException
Certificate
from an
iterator that holds a Cert
and a Signature
.
elems
- Iterator
holding a Cert
and a
Signature
(in this order).
Cert
and the
Signature
in elems
.
java.security.cert.CertificateException
- if elems
does not contain
the expected values.public void toElements(java.util.List elems)
null
), the Cert
,
and the Signture
of this Certificate
to
the given List.
elems
- List
to add the issuer (if not
null
), the Cert
, and the
Signture
of this Certificate
to.public static Certificate fromSequence(Sequence seq) throws java.security.cert.CertificateException
Certificate
from a
given Sequence
that contains a Cert
and
a Signature
(in this order).
seq
- Sequence
holding the Cert
and the
Signature
to create the Certificate
from.
Certificate
.
java.security.cert.CertificateException
- if the creation of the
Certificate
failed.public Sequence toSequence()
Sequence
containing the issuer (if not
null
), the Cert
, and the
Signature
of this Certificate
.
public java.lang.String toString()
Object.toString()
public byte[] getEncoded()
Certificate.getEncoded()
public java.lang.String getFormat()
Certificate
, namely
"SEXP"
.
Certificate
("SEXP"
).
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |