Return new generatedKeyPair in loadKeys of testtool 72/82572/2
authorAnna Bencurova <Anna.Bencurova@pantheon.tech>
Wed, 19 Jun 2019 19:50:53 +0000 (21:50 +0200)
committerAnna Bencurova <Anna.Bencurova@pantheon.tech>
Wed, 19 Jun 2019 21:36:28 +0000 (23:36 +0200)
This can be done to avoid sendKexInit() no resolved signatures available
error while first login.

JIRA: NETCONF-612
Change-Id: I32f5b8ea5f3c9a9c613e000932ca0fe205451c74
Signed-off-by: Anna Bencurova <Anna.Bencurova@pantheon.tech>
netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/VirtualKeyPairProvider.java

index f9238e2e7f10d4663b8d6b75fc02e2330726e148..4d389f73b77e97ce447e24afa41aa06546d3fccb 100644 (file)
@@ -71,10 +71,8 @@ public class VirtualKeyPairProvider implements KeyPairProvider {
                         algorithm, keySpecification, keySize, exception);
                 throw new IllegalArgumentException("An error occurred during generation of a new ke pair.", exception);
             }
-        } else {
-            return Collections.singleton(generatedKeyPair);
         }
-        return Collections.emptyList();
+        return Collections.singleton(generatedKeyPair);
     }
 
     /**