From a7ff340af6b0663589de0a1237f53bf61b14fac8 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 29 Aug 2019 10:15:25 -0700 Subject: [PATCH 1/2] go-ipfs-config: chore: bump minimum key size to 2048 --- config/init.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/init.go b/config/init.go index 7f11c3a3d06..d658866ef62 100644 --- a/config/init.go +++ b/config/init.go @@ -152,8 +152,8 @@ func DefaultDatastoreConfig() Datastore { func identityConfig(out io.Writer, nbits int) (Identity, error) { // TODO guard higher up ident := Identity{} - if nbits < 1024 { - return ident, errors.New("bitsize less than 1024 is considered unsafe") + if nbits < 2048 { + return ident, errors.New("bitsize less than 2048 is considered unsafe") } fmt.Fprintf(out, "generating %v-bit RSA keypair...", nbits) From a04a858922618fcb0164c5c13f4564aca4de88b0 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 29 Aug 2019 10:15:31 -0700 Subject: [PATCH 2/2] go-ipfs-config: add plugins config section * Allow users to store plugin specific config options. * Allow users to disable specific plugins. Eventually, we can use this to allow loading plugins from non-standard locations. --- config/config.go | 1 + config/plugins.go | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 config/plugins.go diff --git a/config/config.go b/config/config.go index ba12fa645c8..3f140474566 100644 --- a/config/config.go +++ b/config/config.go @@ -30,6 +30,7 @@ type Config struct { Provider Provider Reprovider Reprovider Experimental Experiments + Plugins Plugins } const ( diff --git a/config/plugins.go b/config/plugins.go new file mode 100644 index 00000000000..004f5468f74 --- /dev/null +++ b/config/plugins.go @@ -0,0 +1,11 @@ +package config + +type Plugins struct { + Plugins map[string]Plugin `json:",omitempty"` + // TODO: Loader Path? Leaving that out for now due to security concerns. +} + +type Plugin struct { + Disabled bool + Config interface{} +}