question: public static org . opcfoundation . ua . transport . security . KeyPair createHttpsCertificate ( String hostName , String applicationUri , int days , org . opcfoundation . ua . transport . security . KeyPair issuerCert ) throws IOException , GeneralSecurityException { if ( applicationUri == null ) throw new NullPointerException ( "applicationUri must not be null" ) ; if ( logger . isDebugEnabled ( ) ) logger . debug ( "createApplicationInstanceCertificate: getProviders={}" , Arrays . toString ( Security . getProviders ( ) ) ) ; KeyPair keyPair = generateKeyPair ( ) ; X509Certificate cert ; cert = generateCertificate ( "CN=" + hostName , days , applicationUri , keyPair . getPublic ( ) , keyPair . getPrivate ( ) , issuerCert ) ; return toKeyPair ( cert , keyPair . getPrivate ( ) ) ; }
target:  Create a new certificate that can be used with the HTTPS protocol. The certificate should be issued with a CA certificate, especially for the server applications, to ensure interoperability with other client applications.