public class KeyUtil extends Object
KeyUtil
provides methods to obtain
the hosting entity's signing key and decryption key, and
to obtain a partner entity's signature verification key
and encryption related informationModifier and Type | Field and Description |
---|---|
static Hashtable |
encHash |
protected static Hashtable |
sigHash |
Modifier and Type | Method and Description |
---|---|
static X509Certificate |
getCert(com.sun.identity.liberty.ws.meta.jaxb.KeyDescriptorType kd)
Returns certificate stored in
KeyDescriptorType . |
static X509Certificate |
getCert(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor,
String usage)
Returns certificate stored in
KeyDescriptorType in
ProviderDescriptorType . |
static PrivateKey |
getDecryptionKey(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType baseConfig)
Returns the host entity's decryption key.
|
static EncInfo |
getEncInfo(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor,
String entityID,
boolean isIDP)
Returns the encryption information which will be used in
encrypting messages intended for the partner entity.
|
static com.sun.identity.liberty.ws.meta.jaxb.KeyDescriptorType |
getKeyDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor,
String usage)
Returns
KeyDescriptorType from
ProviderDescriptorType . |
static KeyProvider |
getKeyProviderInstance()
Returns the instance of
KeyProvider . |
static String |
getSigningCertAlias(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType baseConfig)
Returns the host entity's signing certificate alias.
|
static X509Certificate |
getVerificationCert(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor,
String entityID,
boolean isIDP)
Returns the partner entity's signature verification certificate.
|
public static KeyProvider getKeyProviderInstance()
KeyProvider
.KeyProvider
public static String getSigningCertAlias(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType baseConfig)
baseConfig
- BaseConfigType
for the host entityString
for host entity's signing
certificate aliaspublic static PrivateKey getDecryptionKey(com.sun.identity.federation.jaxb.entityconfig.BaseConfigType baseConfig)
baseConfig
- BaseConfigType
for the host entityPrivateKey
for decrypting a message received
by the host entitypublic static X509Certificate getVerificationCert(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor, String entityID, boolean isIDP)
providerDescriptor
- ProviderDescriptorType
for
the partner entityentityID
- partner entity's IDisIDP
- whether partner entity's role is IDP or SPX509Certificate
for verifying the partner
entity's signaturepublic static EncInfo getEncInfo(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor, String entityID, boolean isIDP)
providerDescriptor
- ProviderDescriptorType
for
the partner entityentityID
- partner entity's IDisIDP
- whether partner entity's role is IDP or SPEncInfo
which includes partner entity's
public key for wrapping the secret key, data encryption algorithm,
and data encryption strengthpublic static com.sun.identity.liberty.ws.meta.jaxb.KeyDescriptorType getKeyDescriptor(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor, String usage)
KeyDescriptorType
from
ProviderDescriptorType
.providerDescriptor
- ProviderDescriptorType
which
contains KeyDescriptor
s.usage
- type of the KeyDescriptorType
to be retrieved.
Its value is "encryption" or "signing".ProviderDescriptorType
that
matched the usage type.public static X509Certificate getCert(com.sun.identity.liberty.ws.meta.jaxb.ProviderDescriptorType providerDescriptor, String usage)
KeyDescriptorType
in
ProviderDescriptorType
.providerDescriptor
- ProviderDescriptorType
which
contains KeyDescriptor
s.usage
- type of the KeyDescriptorType
to be retrieved.
Its value is "encryption" or "signing".KeyDescriptorType
; or
null
if no certificate is included.public static X509Certificate getCert(com.sun.identity.liberty.ws.meta.jaxb.KeyDescriptorType kd)
KeyDescriptorType
.kd
- KeyDescriptorType
which contains certificate infoKeyDescriptorType
; or
null
if no certificate is included.Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.