Skip to content

Commit

Permalink
Merge pull request #536 from inteon/add_3072_RSA_keysize
Browse files Browse the repository at this point in the history
Add missing RSA 3072 bit key size
  • Loading branch information
luispresuelVenafi authored Dec 11, 2024
2 parents 594fe6a + 79d4b5f commit dbcec10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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 @@ -2006,7 +2006,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

0 comments on commit dbcec10

Please sign in to comment.