Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing RSA 3072 bit key size #536

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/certificate/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
)

func AllSupportedKeySizes() []int {
return []int{1024, DefaultRSAlength, 4096, 8192}
return []int{1024, DefaultRSAlength, 3072, 4096, 8192}
}

//SSH Certificate structures
Expand Down
2 changes: 1 addition & 1 deletion pkg/venafi/tpp/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ func TestReadPolicyConfiguration(t *testing.T) {
[]string{"^Utah$"},
[]string{"^Salt Lake$"},
[]string{"^US$"},
[]endpoint.AllowedKeyConfiguration{{certificate.KeyTypeRSA, []int{2048, 4096, 8192}, nil}},
[]endpoint.AllowedKeyConfiguration{{certificate.KeyTypeRSA, []int{2048, 3072, 4096, 8192}, nil}},
[]string{`^([\p{L}\p{N}-*]+\.)*vfidev\.com$`, `^([\p{L}\p{N}-*]+\.)*vfidev\.net$`, `^([\p{L}\p{N}-*]+\.)*vfide\.org$`},
[]string{".*"},
[]string{".*"},
Expand Down
4 changes: 2 additions & 2 deletions pkg/venafi/tpp/tpp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func TestConvertServerPolicyToInternalPolicy(t *testing.T) {
if k.KeyType != certificate.KeyTypeRSA {
t.Fatal("invalid key type")
}
if len(k.KeySizes) != 3 || k.KeySizes[0] != 2048 || k.KeySizes[1] != 4096 || k.KeySizes[2] != 8192 {
if len(k.KeySizes) != 4 || k.KeySizes[0] != 2048 || k.KeySizes[1] != 3072 || k.KeySizes[2] != 4096 || k.KeySizes[3] != 8192 {
t.Fatal("bad key lengths")
}

Expand Down Expand Up @@ -399,7 +399,7 @@ func TestConvertServerPolicyToInternalPolicy(t *testing.T) {
if k.KeyType != certificate.KeyTypeRSA {
t.Fatal("invalid key type")
}
if len(k.KeySizes) != 3 || k.KeySizes[0] != 2048 || k.KeySizes[1] != 4096 || k.KeySizes[2] != 8192 {
if len(k.KeySizes) != 4 || k.KeySizes[0] != 2048 || k.KeySizes[1] != 3072 || k.KeySizes[2] != 4096 || k.KeySizes[3] != 8192 {
t.Fatal("bad key lengths")
}
k = p.AllowedKeyConfigurations[1]
Expand Down