Change how goodkey.KeyPolicy keeps track of allowed RSA and ECDSA key sizes, to make it slightly more flexible while still retaining the very locked-down allowlist of only 6 acceptable key sizes (RSA 2048, 3076, and 4092, and ECDSA P256, P384, and P521). Add a new constructor which takes in a collection of allowed key sizes, so that users of the goodkey package can customize which keys they accept. Rename the existing constructor to make it clear that it uses hardcoded default values. With these new constructors available, make all of the goodkey.KeyPolicy member fields private, so that a KeyPolicy can only be built via these constructors. |
||
|---|---|---|
| .. | ||
| sagoodkey | ||
| blocked.go | ||
| blocked_test.go | ||
| good_key.go | ||
| good_key_test.go | ||
| weak.go | ||
| weak_test.go | ||