2 * Copyright (c) 2014 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.openflowjava.protocol.api.connection;
11 import java.util.List;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.KeystoreType;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.config.rev140630.PathType;
17 * Class is used only for testing purposes - passwords are hardcoded
18 * @author michal.polkorab
20 public class TlsConfigurationImpl implements TlsConfiguration {
22 private KeystoreType trustStoreType;
23 private String trustStore;
24 private KeystoreType keyStoreType;
25 private String keyStore;
26 private PathType keystorePathType;
27 private PathType truststorePathType;
28 private List<String> cipherSuites;
32 * @param trustStoreType JKS or PKCS12
33 * @param trustStore path to trustStore file
34 * @param trustStorePathType truststore path type (classpath or path)
35 * @param keyStoreType JKS or PKCS12
36 * @param keyStore path to keyStore file
37 * @param keyStorePathType keystore path type (classpath or path)
39 public TlsConfigurationImpl(KeystoreType trustStoreType, String trustStore,
40 PathType trustStorePathType, KeystoreType keyStoreType,
41 String keyStore, PathType keyStorePathType,
42 List<String> cipherSuites) {
43 this.trustStoreType = trustStoreType;
44 this.trustStore = trustStore;
45 this.truststorePathType = trustStorePathType;
46 this.keyStoreType = keyStoreType;
47 this.keyStore = keyStore;
48 this.keystorePathType = keyStorePathType;
49 this.cipherSuites = cipherSuites;
53 public KeystoreType getTlsTruststoreType() {
54 return trustStoreType;
58 public String getTlsTruststore() {
63 public KeystoreType getTlsKeystoreType() {
68 public String getTlsKeystore() {
73 public PathType getTlsKeystorePathType() {
74 return keystorePathType;
78 public PathType getTlsTruststorePathType() {
79 return truststorePathType;
83 public String getKeystorePassword() {
84 return "opendaylight";
88 public String getCertificatePassword() {
89 return "opendaylight";
93 public String getTruststorePassword() {
94 return "opendaylight";
98 public List<String> getCipherSuites() {