From 9f8f0194a3c21e640a5b917f86bf204c014d730d Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Wed, 8 Aug 2018 21:52:34 +0100 Subject: Correct client behaviours for option handling A config file is not required - don't error if one doesn't exist. Don't overwrite default options with an empty string. --- client/keys.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'client/keys.go') diff --git a/client/keys.go b/client/keys.go index b488ea2..f573136 100644 --- a/client/keys.go +++ b/client/keys.go @@ -59,7 +59,9 @@ func pemBlockForKey(priv interface{}) (*pem.Block, error) { // Default is "rsa" func KeyType(keyType string) KeyOption { return func(o *options) { - o.keytype = keyType + if keyType != "" { + o.keytype = keyType + } } } -- cgit v1.2.3