Package org.xwiki.crypto.pkix.params
Interface CertifiedPublicKey
-
- All Known Subinterfaces:
X509CertifiedPublicKey
public interface CertifiedPublicKey
Certified binding of a principal to a public key.- Since:
- 5.4
- Version:
- $Id: 0b42b1520d441670a0a84997596959bb3cc26b6e $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getEncoded()
PrincipalIndentifier
getIssuer()
PublicKeyParameters
getPublicKeyParameters()
PrincipalIndentifier
getSubject()
boolean
isSelfSigned()
boolean
isSignedBy(PublicKeyParameters publicKey)
Check that the key has been certified by the private key associated with the given public key.
-
-
-
Method Detail
-
getIssuer
PrincipalIndentifier getIssuer()
- Returns:
- the name of the issuer of the certificate.
-
getSubject
PrincipalIndentifier getSubject()
- Returns:
- the name of the owner of the certified public key.
-
getPublicKeyParameters
PublicKeyParameters getPublicKeyParameters()
- Returns:
- the certified public key parameters.
-
isSignedBy
boolean isSignedBy(PublicKeyParameters publicKey) throws GeneralSecurityException
Check that the key has been certified by the private key associated with the given public key.- Parameters:
publicKey
- the public key of the signer.- Returns:
- true if the signature is verified.
- Throws:
GeneralSecurityException
- if the signing algorithm is unable to proceed properly.
-
isSelfSigned
boolean isSelfSigned()
- Returns:
- true if this certificate is self signed.
- Since:
- 6.0M1
-
getEncoded
byte[] getEncoded() throws IOException
- Returns:
- the ASN.1 encoded form of this certificate.
- Throws:
IOException
- on encoding error.
-
-