2 * Copyright (c) 2013 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.impl.clients;
11 import java.io.InputStream;
14 * Class for storing keys
16 * @author michal.polkorab
18 public final class ClientSslKeyStore {
20 private static final String filename = "/selfSignedSwitch";
22 private ClientSslKeyStore() {
23 throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
27 * InputStream instance of key
29 * @return key as InputStream
31 public static InputStream asInputStream() {
32 InputStream in = ClientSslKeyStore.class.getResourceAsStream(filename);
34 throw new IllegalStateException("KeyStore file not found: " + filename);
40 * @return certificate password as char[]
42 public static char[] getCertificatePassword() {
43 return "opendaylight".toCharArray();
47 * @return KeyStore password as char[]
49 public static char[] getKeyStorePassword() {
50 return "opendaylight".toCharArray();