Class ServerKeystoreLoader


  • class ServerKeystoreLoader
    extends java.lang.Object
    A server keystore loader/generator.
    Author:
    Taken from the OPC UA examples
    • Field Detail

      • IP_ADDR_PATTERN

        private static final java.util.regex.Pattern IP_ADDR_PATTERN
      • PASSWORD

        private static final char[] PASSWORD
      • logger

        private final org.slf4j.Logger logger
      • serverCertificateChain

        private java.security.cert.X509Certificate[] serverCertificateChain
      • serverCertificate

        private java.security.cert.X509Certificate serverCertificate
      • serverKeyPair

        private java.security.KeyPair serverKeyPair
    • Constructor Detail

      • ServerKeystoreLoader

        ServerKeystoreLoader()
    • Method Detail

      • load

        ServerKeystoreLoader load​(java.io.File baseDir)
                           throws java.util.concurrent.ExecutionException
        Loads the server keystore from the given base directory.
        Parameters:
        baseDir - the base directory
        Returns:
        this
        Throws:
        java.util.concurrent.ExecutionException - if anything goes wrong
      • getServerCertificate

        java.security.cert.X509Certificate getServerCertificate()
        Returns the server certificate.
        Returns:
        the server certificate
      • getServerCertificateChain

        public java.security.cert.X509Certificate[] getServerCertificateChain()
        Returns the server certificate chain.
        Returns:
        the server certificate chain
      • getServerKeyPair

        java.security.KeyPair getServerKeyPair()
        Returns the server key pair.
        Returns:
        the server key pair