X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fnetconf%2Fnetconf-ssh%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetconf%2Fssh%2Fauthentication%2FPEMGenerator.java;h=348fe006f3a7d4cfefcb8c502a9115da422a0a61;hp=73886c4f461eb3ecd60710da40cf6fc3ff361e54;hb=b80124e3f7b11cf2f5e5bd4a6b033d855ff4d0d4;hpb=a2c374bb7bd34eb27bac4db587e843378181762e diff --git a/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/authentication/PEMGenerator.java b/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/authentication/PEMGenerator.java index 73886c4f46..348fe006f3 100644 --- a/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/authentication/PEMGenerator.java +++ b/opendaylight/netconf/netconf-ssh/src/main/java/org/opendaylight/controller/netconf/ssh/authentication/PEMGenerator.java @@ -8,6 +8,7 @@ package org.opendaylight.controller.netconf.ssh.authentication; +import java.security.NoSuchAlgorithmException; import org.apache.commons.io.FileUtils; import org.bouncycastle.openssl.PEMWriter; import org.slf4j.Logger; @@ -25,7 +26,7 @@ public class PEMGenerator { private static final Logger logger = LoggerFactory.getLogger(PEMGenerator.class); private static final int KEY_SIZE = 4096; - public static String generateTo(File privateFile) throws Exception { + public static String generateTo(File privateFile) throws IOException, NoSuchAlgorithmException { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); SecureRandom sr = new SecureRandom(); keyGen.initialize(KEY_SIZE, sr);