Skip to content
Snippets Groups Projects
Commit d33bf918 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Remove rsaBitLength javascript settings. Use the defaults.

parent 557b66d7
No related branches found
No related tags found
Loading
......@@ -5,10 +5,6 @@
// LICENSE file. //
////////////////////////////////////////////////////////////////////////////////
// This file is compiled for all architectures except WebAssembly.
//go:build !js || !wasm
// +build !js !wasm
package rsa
// DefaultRSABitLen is the RSA key length used in the system, in bits.
......
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2022 xx foundation //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file. //
////////////////////////////////////////////////////////////////////////////////
// This file is only compiled for WebAssembly.
package rsa
import (
"fmt"
jww "github.com/spf13/jwalterweatherman"
)
// DefaultRSABitLen is the RSA key length used in the system, in bits.
//
// WARNING: This bit size is smaller than the minimum recommended bit size of
// 3072. Do not use this in production. Only use it for testing.
//
// FIXME: Once WebAssembly can run in a HTTPS server, this should not be
// necessary and needs to be removed. Do not use this is production.
var DefaultRSABitLen = 1024
func init() {
// Print with both jww and fmt to ensure that the message is seen
msg := fmt.Sprintf("Using %d-bit RSA key size due to performance issues "+
"with key generation in WebAssembly. This is not safe and not "+
"generally compatible", DefaultRSABitLen)
fmt.Println(msg)
jww.CRITICAL.Print(msg)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment