Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
trishankatdatadog committed Aug 31, 2022
1 parent 34d5b4d commit 0ec0679
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions builtin/logical/transit/path_sign_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Options are 'pss' or 'pkcs1v15'. Defaults to 'pss'`,
Type: framework.TypeString,
Default: "auto",
Description: `The salt length used to sign. Currently only applies to the RSA PSS signature scheme.
Options are 'auto' (crypto/rsa.PSSSaltLengthAuto), 'hash' (crypto/rsa.PSSSaltLengthEqualsHash), or a number of bytes. Defaults to 'auto'.`,
Options are 'auto' (the default used by Golang, causing the salt to be as large as possible when signing), 'hash' (causes the salt length to equal the length of the hash used in the signature), or an integer between the minimum and the maximum permissible salt lengths for the given RSA key size. Defaults to 'auto'.`,
},
},

Expand Down Expand Up @@ -232,7 +232,7 @@ Options are 'pss' or 'pkcs1v15'. Defaults to 'pss'`,
Type: framework.TypeString,
Default: "auto",
Description: `The salt length used to sign. Currently only applies to the RSA PSS signature scheme.
Options are 'auto' (crypto/rsa.PSSSaltLengthAuto), 'hash' (crypto/rsa.PSSSaltLengthEqualsHash), or a number of bytes. Defaults to 'auto'.`,
Options are 'auto' (the default used by Golang, causing the salt to be as large as possible when signing), 'hash' (causes the salt length to equal the length of the hash used in the signature), or an integer between the minimum and the maximum permissible salt lengths for the given RSA key size. Defaults to 'auto'.`,
},
},

Expand Down
2 changes: 1 addition & 1 deletion sdk/helper/keysutil/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ func Test_RSA_PSS(t *testing.T) {
}

// 3. For three possible valid salt lengths...
t.Log(tabs[3], "Test all valid salt lengths")
t.Log(tabs[3], "Test three possible valid salt lengths")
midSaltLength := mathrand.Intn(maxSaltLength-1) + 1 // [1, maxSaltLength)
validSaltLengths := []int{minSaltLength, midSaltLength, maxSaltLength}
for _, saltLength := range validSaltLengths {
Expand Down
12 changes: 12 additions & 0 deletions website/content/api-docs/secret/transit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1157,6 +1157,12 @@ supports signing.
also change the output encoding to URL-safe Base64 encoding instead of
standard Base64-encoding.

- `salt_length` `(string: "auto")` – The salt length used to sign. This currently only applies to the RSA PSS signature scheme. Options are:

- `auto`: The default used by Golang (causing the salt to be as large as possible when signing)
- `hash`: Causes the salt length to equal the length of the hash used in the signature
- An integer between the minimum and the maximum permissible salt lengths for the given RSA key size.

### Sample Request

```shell-session
Expand Down Expand Up @@ -1328,6 +1334,12 @@ data.
also expect the input encoding to URL-safe Base64 encoding instead of
standard Base64-encoding.

- `salt_length` `(string: "auto")` – The salt length used to sign. This currently only applies to the RSA PSS signature scheme. Options are:

- `auto`: The default used by Golang (causing the salt to be as large as possible when signing)
- `hash`: Causes the salt length to equal the length of the hash used in the signature
- An integer between the minimum and the maximum permissible salt lengths for the given RSA key size.

### Sample Request

```shell-session
Expand Down

0 comments on commit 0ec0679

Please sign in to comment.