@Test public void getDefaultTest() { ICertificateManager certificateManager = CertificateManagerConfig.getDefault(bindingDataBroker); Assert.assertNotNull(certificateManager); Assert.assertNotNull(certificateManager.getServerContext()); Assert.assertEquals(certificateManager.getServerContext().getProtocol(), "TLS"); Assert.assertNotNull(certificateManager.getServerContext().getProvider()); Assert.assertNotNull(certificateManager.getServerContext().getDefaultSSLParameters()); }
public static ICertificateManager getDefault(final DataBroker bindingDataBroker) { final List<CipherSuites> cipherSuites = new ArrayList<>(); final CtlKeystore ctlKeystore = new CtlKeystoreBuilder() .setName("ctl.jks") .setAlias("controller") .setDname("CN=ODL, OU=Dev, O=LinuxFoundation, L=QC Montreal, C=CA") .setValidity(365) .setKeyAlg("RSA") .setSignAlg("SHA1WithRSAEncryption") .setCipherSuites(cipherSuites) .setStorePassword("") .setKeysize(1024) .build(); final TrustKeystore trustKeystore = new TrustKeystoreBuilder() .setName("truststore.jks") .build(); final AaaCertServiceConfig aaaCertServiceConfig = new AaaCertServiceConfigBuilder() .setUseConfig(true) .setUseMdsal(true) .setBundleName("opendaylight") .setCtlKeystore(ctlKeystore) .setTrustKeystore(trustKeystore) .build(); final AaaEncryptServiceConfig encrySrvConfig = new AaaEncryptServiceConfigBuilder() .setEncryptKey("V1S1ED4OMeEh") .setPasswordLength(12) .setEncryptSalt("TdtWeHbch/7xP52/rp3Usw==") .setEncryptMethod("PBKDF2WithHmacSHA1") .setEncryptType("AES") .setEncryptIterationCount(32768) .setEncryptKeyLength(128) .setCipherTransforms("AES/CBC/PKCS5Padding") .build(); final AAAEncryptionService encryptionSrv = new AAAEncryptionServiceImpl(encrySrvConfig, bindingDataBroker); return new CertificateManagerService(aaaCertServiceConfig, bindingDataBroker, encryptionSrv); }
CertificateManagerConfig { public static ICertificateManager getDefault(final DataBroker bindingDataBroker) { final List<CipherSuites> cipherSuites = new ArrayList<>(); final CtlKeystore ctlKeystore = new CtlKeystoreBuilder() .setName("ctl.jks") .setAlias("controller") .setDname("CN=ODL, OU=Dev, O=LinuxFoundation, L=QC Montreal, C=CA") .setValidity(365) .setKeyAlg("RSA") .setSignAlg("SHA1WithRSAEncryption") .setCipherSuites(cipherSuites) .setStorePassword("") .setKeysize(1024) .build(); final TrustKeystore trustKeystore = new TrustKeystoreBuilder() .setName("truststore.jks") .build(); final AaaCertServiceConfig aaaCertServiceConfig = new AaaCertServiceConfigBuilder() .setUseConfig(true) .setUseMdsal(true) .setBundleName("opendaylight") .setCtlKeystore(ctlKeystore) .setTrustKeystore(trustKeystore) .build(); final AaaEncryptServiceConfig encrySrvConfig = new AaaEncryptServiceConfigBuilder() .setEncryptKey("V1S1ED4OMeEh") .setPasswordLength(12) .setEncryptSalt("TdtWeHbch/7xP52/rp3Usw==") .setEncryptMethod("PBKDF2WithHmacSHA1") .setEncryptType("AES") .setEncryptIterationCount(32768) .setEncryptKeyLength(128) .setCipherTransforms("AES/CBC/PKCS5Padding") .build(); final AAAEncryptionService encryptionSrv = new AAAEncryptionServiceImpl(encrySrvConfig, bindingDataBroker); return new CertificateManagerService(aaaCertServiceConfig, bindingDataBroker, encryptionSrv); } }
CertificateManagerConfig { public static ICertificateManager getDefault(final DataBroker bindingDataBroker) { final List<CipherSuites> cipherSuites = new ArrayList<>(); final CtlKeystore ctlKeystore = new CtlKeystoreBuilder() .setName("ctl.jks") .setAlias("controller") .setDname("CN=ODL, OU=Dev, O=LinuxFoundation, L=QC Montreal, C=CA") .setValidity(365) .setKeyAlg("RSA") .setSignAlg("SHA1WithRSAEncryption") .setCipherSuites(cipherSuites) .setStorePassword("") .setKeysize(1024) .build(); final TrustKeystore trustKeystore = new TrustKeystoreBuilder() .setName("truststore.jks") .build(); final AaaCertServiceConfig aaaCertServiceConfig = new AaaCertServiceConfigBuilder() .setUseConfig(true) .setUseMdsal(true) .setBundleName("opendaylight") .setCtlKeystore(ctlKeystore) .setTrustKeystore(trustKeystore) .build(); final AaaEncryptServiceConfig encrySrvConfig = new AaaEncryptServiceConfigBuilder() .setEncryptKey("V1S1ED4OMeEh") .setPasswordLength(12) .setEncryptSalt("TdtWeHbch/7xP52/rp3Usw==") .setEncryptMethod("PBKDF2WithHmacSHA1") .setEncryptType("AES") .setEncryptIterationCount(32768) .setEncryptKeyLength(128) .setCipherTransforms("AES/CBC/PKCS5Padding") .build(); final AAAEncryptionService encryptionSrv = new AAAEncryptionServiceImpl(encrySrvConfig, bindingDataBroker); return new CertificateManagerService(aaaCertServiceConfig, bindingDataBroker, encryptionSrv); } private  CertificateManagerConfig(); }
CertificateManagerConfig { public static ICertificateManager getDefault(final DataBroker bindingDataBroker) { final List<CipherSuites> cipherSuites = new ArrayList<>(); final CtlKeystore ctlKeystore = new CtlKeystoreBuilder() .setName("ctl.jks") .setAlias("controller") .setDname("CN=ODL, OU=Dev, O=LinuxFoundation, L=QC Montreal, C=CA") .setValidity(365) .setKeyAlg("RSA") .setSignAlg("SHA1WithRSAEncryption") .setCipherSuites(cipherSuites) .setStorePassword("") .setKeysize(1024) .build(); final TrustKeystore trustKeystore = new TrustKeystoreBuilder() .setName("truststore.jks") .build(); final AaaCertServiceConfig aaaCertServiceConfig = new AaaCertServiceConfigBuilder() .setUseConfig(true) .setUseMdsal(true) .setBundleName("opendaylight") .setCtlKeystore(ctlKeystore) .setTrustKeystore(trustKeystore) .build(); final AaaEncryptServiceConfig encrySrvConfig = new AaaEncryptServiceConfigBuilder() .setEncryptKey("V1S1ED4OMeEh") .setPasswordLength(12) .setEncryptSalt("TdtWeHbch/7xP52/rp3Usw==") .setEncryptMethod("PBKDF2WithHmacSHA1") .setEncryptType("AES") .setEncryptIterationCount(32768) .setEncryptKeyLength(128) .setCipherTransforms("AES/CBC/PKCS5Padding") .build(); final AAAEncryptionService encryptionSrv = new AAAEncryptionServiceImpl(encrySrvConfig, bindingDataBroker); return new CertificateManagerService(aaaCertServiceConfig, bindingDataBroker, encryptionSrv); } private  CertificateManagerConfig(); static ICertificateManager getDefault(final DataBroker bindingDataBroker); }
CertificateManagerConfig { public static ICertificateManager getDefault(final DataBroker bindingDataBroker) { final List<CipherSuites> cipherSuites = new ArrayList<>(); final CtlKeystore ctlKeystore = new CtlKeystoreBuilder() .setName("ctl.jks") .setAlias("controller") .setDname("CN=ODL, OU=Dev, O=LinuxFoundation, L=QC Montreal, C=CA") .setValidity(365) .setKeyAlg("RSA") .setSignAlg("SHA1WithRSAEncryption") .setCipherSuites(cipherSuites) .setStorePassword("") .setKeysize(1024) .build(); final TrustKeystore trustKeystore = new TrustKeystoreBuilder() .setName("truststore.jks") .build(); final AaaCertServiceConfig aaaCertServiceConfig = new AaaCertServiceConfigBuilder() .setUseConfig(true) .setUseMdsal(true) .setBundleName("opendaylight") .setCtlKeystore(ctlKeystore) .setTrustKeystore(trustKeystore) .build(); final AaaEncryptServiceConfig encrySrvConfig = new AaaEncryptServiceConfigBuilder() .setEncryptKey("V1S1ED4OMeEh") .setPasswordLength(12) .setEncryptSalt("TdtWeHbch/7xP52/rp3Usw==") .setEncryptMethod("PBKDF2WithHmacSHA1") .setEncryptType("AES") .setEncryptIterationCount(32768) .setEncryptKeyLength(128) .setCipherTransforms("AES/CBC/PKCS5Padding") .build(); final AAAEncryptionService encryptionSrv = new AAAEncryptionServiceImpl(encrySrvConfig, bindingDataBroker); return new CertificateManagerService(aaaCertServiceConfig, bindingDataBroker, encryptionSrv); } private  CertificateManagerConfig(); static ICertificateManager getDefault(final DataBroker bindingDataBroker);  }