be.ehealth.technicalconnector.handler.utils

## Class WSSecurityCrypto

- java.lang.Object
- - be.ehealth.technicalconnector.handler.utils.WSSecurityCrypto

- All Implemented Interfaces:
    org.apache.wss4j.common.crypto.Crypto

      public class WSSecurityCrypto
      extends Object
      implements org.apache.wss4j.common.crypto.Crypto

  Basic implementation fo the `Crypto`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WSSecurityCrypto(Credential cred)`
    `WSSecurityCrypto(PrivateKey privateKey, X509Certificate certificate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `getBytesFromCertificates(X509Certificate[] certs)`
    `CertificateFactory` | `getCertificateFactory()`
    `X509Certificate[]` | `getCertificatesFromBytes(byte[] data)`
    `String` | `getCryptoProvider()`
    `String` | `getDefaultX509Identifier()`
    `PrivateKey` | `getPrivateKey(PublicKey publicKey, CallbackHandler callbackHandler)`
    `PrivateKey` | `getPrivateKey(String identifier, String password)`
    `PrivateKey` | `getPrivateKey(X509Certificate certificate, CallbackHandler callbackHandler)`
    `byte[]` | `getSKIBytesFromCert(X509Certificate cert)`
    `String` | `getTrustProvider()`
    `X509Certificate[]` | `getX509Certificates(org.apache.wss4j.common.crypto.CryptoType cryptoType)`
    `String` | `getX509Identifier(X509Certificate cert)`
    `X509Certificate` | `loadCertificate(InputStream in)`
    `void` | `setCertificateFactory(CertificateFactory certificateFactory)`
    `void` | `setCryptoProvider(String provider)`
    `void` | `setDefaultX509Identifier(String identifier)`
    `void` | `setTrustProvider(String trustProvider)`
    `void` | `verifyTrust(PublicKey publicKey)`
    `void` | `verifyTrust(X509Certificate[] x509Certificates, boolean b, Collection<Pattern> collection, Collection<Pattern> collection1)`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WSSecurityCrypto

          public WSSecurityCrypto(Credential cred)
                           throws TechnicalConnectorException

      Throws:
        `TechnicalConnectorException`

    - #### WSSecurityCrypto

          public WSSecurityCrypto(PrivateKey privateKey,
                                  X509Certificate certificate)

  - ### Method Detail

    - #### getX509Certificates

          public X509Certificate[] getX509Certificates(org.apache.wss4j.common.crypto.CryptoType cryptoType)
                                                throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getX509Certificates` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getCryptoProvider

          public String getCryptoProvider()

      Specified by:
        `getCryptoProvider` in interface `org.apache.wss4j.common.crypto.Crypto`

    - #### getBytesFromCertificates

          public byte[] getBytesFromCertificates(X509Certificate[] certs)
                                          throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getBytesFromCertificates` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getCertificateFactory

          public CertificateFactory getCertificateFactory()
                                                   throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getCertificateFactory` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getCertificatesFromBytes

          public X509Certificate[] getCertificatesFromBytes(byte[] data)
                                                     throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getCertificatesFromBytes` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getDefaultX509Identifier

          public String getDefaultX509Identifier()
                                          throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getDefaultX509Identifier` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getPrivateKey

          public PrivateKey getPrivateKey(X509Certificate certificate,
                                          CallbackHandler callbackHandler)
                                   throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getPrivateKey` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getPrivateKey

          public PrivateKey getPrivateKey(PublicKey publicKey,
                                          CallbackHandler callbackHandler)
                                   throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getPrivateKey` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getPrivateKey

          public PrivateKey getPrivateKey(String identifier,
                                          String password)
                                   throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getPrivateKey` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### verifyTrust

          public void verifyTrust(X509Certificate[] x509Certificates,
                                  boolean b,
                                  Collection<Pattern> collection,
                                  Collection<Pattern> collection1)
                           throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `verifyTrust` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getSKIBytesFromCert

          public byte[] getSKIBytesFromCert(X509Certificate cert)
                                     throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getSKIBytesFromCert` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### verifyTrust

          public void verifyTrust(PublicKey publicKey)
                           throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `verifyTrust` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### getX509Identifier

          public String getX509Identifier(X509Certificate cert)
                                   throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `getX509Identifier` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### loadCertificate

          public X509Certificate loadCertificate(InputStream in)
                                          throws org.apache.wss4j.common.ext.WSSecurityException

      Specified by:
        `loadCertificate` in interface `org.apache.wss4j.common.crypto.Crypto`
      Throws:
        `org.apache.wss4j.common.ext.WSSecurityException`

    - #### setCryptoProvider

          public void setCryptoProvider(String provider)

      Specified by:
        `setCryptoProvider` in interface `org.apache.wss4j.common.crypto.Crypto`

    - #### getTrustProvider

          public String getTrustProvider()

      Specified by:
        `getTrustProvider` in interface `org.apache.wss4j.common.crypto.Crypto`

    - #### setTrustProvider

          public void setTrustProvider(String trustProvider)

      Specified by:
        `setTrustProvider` in interface `org.apache.wss4j.common.crypto.Crypto`

    - #### setDefaultX509Identifier

          public void setDefaultX509Identifier(String identifier)

      Specified by:
        `setDefaultX509Identifier` in interface `org.apache.wss4j.common.crypto.Crypto`

    - #### setCertificateFactory

          public void setCertificateFactory(CertificateFactory certificateFactory)

      Specified by:
        `setCertificateFactory` in interface `org.apache.wss4j.common.crypto.Crypto`

Connector Packaging PERSPHYSICIAN 4.9.5 API
Copyright © {inceptionYear}-2026 eHealth. All Rights Reserved.