Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xml.security.keys.keyresolver.implementations
Class PrivateKeyResolver

    java.lang.Object
      org.apache.xml.security.keys.keyresolver.KeyResolverSpi
          org.apache.xml.security.keys.keyresolver.implementations.PrivateKeyResolver

    public class PrivateKeyResolver

extends KeyResolverSpi

Resolves a PrivateKey within a KeyStore based on the KeyInfo hints. For X509Data hints, the certificate associated with the private key entry must match. For a KeyName hint, the KeyName must match the alias of a PrivateKey entry within the KeyStore.

Field Summary

Fields inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
`globalResolver, properties, secureValidation`

Constructor Summary
`PrivateKeyResolver(java.security.KeyStore keyStore, char[] password)` Constructor.

Method Summary
`boolean` | `engineCanResolve(org.w3c.dom.Element element, java.lang.String BaseURI, StorageResolver storage)` This method returns whether the KeyResolverSpi is able to perform the requested action.
`java.security.PrivateKey` | `engineLookupAndResolvePrivateKey(org.w3c.dom.Element element, java.lang.String baseURI, StorageResolver storage)` Method engineResolvePrivateKey
`java.security.PublicKey` | `engineLookupAndResolvePublicKey(org.w3c.dom.Element element, java.lang.String BaseURI, StorageResolver storage)` Method engineLookupAndResolvePublicKey
`java.security.cert.X509Certificate` | `engineLookupResolveX509Certificate(org.w3c.dom.Element element, java.lang.String BaseURI, StorageResolver storage)` Method engineResolveX509Certificate
`javax.crypto.SecretKey` | `engineResolveSecretKey(org.w3c.dom.Element element, java.lang.String BaseURI, StorageResolver storage)` Method engineResolveSecretKey

Methods inherited from class org.apache.xml.security.keys.keyresolver.KeyResolverSpi
`engineGetProperty, engineLookupAndResolveSecretKey, engineResolvePublicKey, engineResolveX509Certificate, engineSetProperty, setGlobalResolver, setSecureValidation, understandsProperty`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PrivateKeyResolver

    public PrivateKeyResolver(java.security.KeyStore keyStore,
                              char[] password)

  Constructor.

Method Detail

### engineCanResolve

    public boolean engineCanResolve(org.w3c.dom.Element element,
                                    java.lang.String BaseURI,
                                    StorageResolver storage)

  This method returns whether the KeyResolverSpi is able to perform the requested action.

  Overrides:
    `engineCanResolve` in class `KeyResolverSpi`
  Parameters:
    `element` -
    `BaseURI` -
    `storage` -
  Returns:
    whether the KeyResolverSpi is able to perform the requested action.

### engineLookupAndResolvePublicKey

    public java.security.PublicKey engineLookupAndResolvePublicKey(org.w3c.dom.Element element,
                                                                   java.lang.String BaseURI,
                                                                   StorageResolver storage)
                                                            throws KeyResolverException

  Method engineLookupAndResolvePublicKey

  Overrides:
    `engineLookupAndResolvePublicKey` in class `KeyResolverSpi`
  Parameters:
    `element` -
    `BaseURI` -
    `storage` -
  Returns:
    null if no `PublicKey` could be obtained
  Throws:
    `KeyResolverException`

### engineLookupResolveX509Certificate

    public java.security.cert.X509Certificate engineLookupResolveX509Certificate(org.w3c.dom.Element element,
                                                                                 java.lang.String BaseURI,
                                                                                 StorageResolver storage)
                                                                          throws KeyResolverException

  Method engineResolveX509Certificate

  Overrides:
    `engineLookupResolveX509Certificate` in class `KeyResolverSpi`
  Parameters:
    `element` -
    `BaseURI` -
    `storage` -
  Returns:
    resolved X509Certificate key from the registered from the elements
  Throws:
    `KeyResolverException`

### engineResolveSecretKey

    public javax.crypto.SecretKey engineResolveSecretKey(org.w3c.dom.Element element,
                                                         java.lang.String BaseURI,
                                                         StorageResolver storage)
                                                  throws KeyResolverException

  Method engineResolveSecretKey

  Overrides:
    `engineResolveSecretKey` in class `KeyResolverSpi`
  Parameters:
    `element` -
    `BaseURI` -
    `storage` -
  Returns:
    resolved SecretKey key or null if no `SecretKey` could be obtained
  Throws:
    `KeyResolverException`

### engineLookupAndResolvePrivateKey

    public java.security.PrivateKey engineLookupAndResolvePrivateKey(org.w3c.dom.Element element,
                                                                     java.lang.String baseURI,
                                                                     StorageResolver storage)
                                                              throws KeyResolverException

  Method engineResolvePrivateKey

  Overrides:
    `engineLookupAndResolvePrivateKey` in class `KeyResolverSpi`
  Parameters:
    `element` -
    `baseURI` -
    `storage` -
  Returns:
    resolved PrivateKey key or null if no `PrivateKey` could be obtained
  Throws:
    `KeyResolverException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD