Commit Graph

129 Commits (0efaf514d72373fa3b10688f2b3975982fbebf99)

Author SHA1 Message Date
Mariano Cano 68a89fbb02 Split Go 1.19 problematic with build tags 2 years ago
Shulhan 0e7257a236
kms/uri: fix test on Parse for the next Go release
The next Go release add field OmitHost to url.URL [1] which cause the
TestParse fail.
Since the CI supports two consecutive Go versions at the same times, we
copy the uri_test.go to uri_119_test.go for testing with Go 1.19.

While at it, print the got and want object using the same format
(%#v) and type (*URL) for consistency.

[1] https://go-review.googlesource.com/c/go/+/391294
2 years ago
Shulhan fe04f93d7f
all: reformat all go files with the next gofmt (Go 1.19)
There are some changes that manually edited, for example using '-' as
default list and grouping imports.
2 years ago
Mariano Cano d5c6572da4 Fix typo. 2 years ago
Mariano Cano 5a32401d23 Implement the kms.Decrypter with PKCS#11
This interface allows the use of SCEP with PKCS#11 modules.
2 years ago
Herman Slatman e7a988b2cd
Pin golangci-lint to v1.43.0 and fix issues 3 years ago
Mariano Cano 7ec1424cb6 Fix help. 3 years ago
Mariano Cano 8366b7ddf1 Revert "Remove extractable from StoreCertificate."
This reverts commit 614ee79489.
3 years ago
Mariano Cano 614ee79489 Remove extractable from StoreCertificate. 3 years ago
Mariano Cano fa11e82b67 Add tests with extractable property. 3 years ago
Mariano Cano 886b9a1d8d Store the certificate passed. 3 years ago
Mariano Cano aa80bf9f07 Merge branch 'smallstep_master' into extractable 3 years ago
Mariano Cano 6be383da34 Refactor pkcs#11 extractable certs and keys. 3 years ago
Mariano Cano bef50bd7d9 Fix typo in variable name. 3 years ago
Mariano Cano ead394fba7 Add strategy to retry the sign operation if the key is not yet ready 3 years ago
Mariano Cano edd475b81b Allow to configure azurekms using the URI
With an URI, azurekms can be configured with client credentials,
and it can define a default vault and protection level.
3 years ago
Mariano Cano 44f0d61354 Fix typo. 3 years ago
Mariano Cano a2b03083c8 Fix gocritic warnings. 3 years ago
Mariano Cano 2aee71b4c0 Fix typo. 3 years ago
Mariano Cano e15b5faf7d Merge branch 'master' into keyvault 3 years ago
Mariano Cano 5d0bd7d155 Fix grammar in comments. 3 years ago
max furman 5fc24c697c Fix a few more linter warnings and remove GOFLAGS from make lint 3 years ago
max furman 933b40a02a Introduce gocritic linter and address warnings 3 years ago
Mariano Cano f6e69bf826 Fix typo. 3 years ago
Mariano Cano c638c282d8 Add omitempty to KMS options. 3 years ago
Mariano Cano 822a1e3bdb Add variable with the default implementation. 3 years ago
Mariano Cano 2240ebbadc Add NameValidator interface and implement it for azurekms. 3 years ago
Mariano Cano abdb56065d Allow o specify an hsm using the uri. 3 years ago
Mariano Cano f1ef3fb351 Add GetBool(s string) bool to URI type. 3 years ago
Mariano Cano 500b540406 Remove unused code. 3 years ago
Mariano Cano 2026787ce4 Add some extra coverage. 3 years ago
Mariano Cano 08c9902f29 Add new alias in the kms package. 3 years ago
Mariano Cano 505b1f3678 Add new test case with a version in the opaque string. 3 years ago
Mariano Cano d2581489a3 Redefine uris and set proper type.
URIs will now have the form:

  - azurekms:name=my-key;vault=my-vault
  - azurekms:name=my-key;vault=my-vault?version=my-version
3 years ago
Mariano Cano 656099c4f0 Add type for azurekms. 3 years ago
Mariano Cano 56c3559e52 Add some extra coverage. 3 years ago
Mariano Cano 6389100325 Add unit tests for azurekms. 3 years ago
Mariano Cano 97d08a1b61 Fix typos. 3 years ago
Mariano Cano 392a18465f Add initial implementation of Azure Key Vault KMS.
Fixes #462
3 years ago
Mariano Cano 6d644880bd Allow to kms signers to define the SignatureAlgorithm
CloudKMS keys signs data using an specific signature algorithm, in RSA keys,
this can be PKCS#1 RSA or RSA-PSS, if the later is used, x509.CreateCertificate
will fail unless the template SignatureCertificate is properly set.

On contrast, AWSKMS RSA keys, are just RSA keys, and can sign with PKCS#1 or
RSA-PSS schemes, so right now the way to enforce one or the other is to used
templates.
3 years ago
max furman 8ba9013f5d gofmt linting errors 3 years ago
max furman 8bec473f8e fix gofmt linting errors 3 years ago
Mariano Cano abd78e2d2a Make kms uri compatible with Go 1.17.
Go 1.17 introduces a change in the net/url package disallowing the
use of semicolon (;) in URL queries. We used url.ParseQuery to
decode the opaque string that is semicolon separated. This change
replaces the semicolon with ampersands before decoding it.
3 years ago
Mariano Cano a864f0134d Fix key version when SHA512WithRSA is used.
There was a typo creating RSA keys with SHA256 digests instead of
SHA512
3 years ago
Gary Belvin 22b471acf9 Extractable certs 3 years ago
Gary Belvin be89459524 Set key export bit 3 years ago
Mariano Cano c4d0c8a18e Fix credentials file parameter on awskms 3 years ago
Herman Slatman 877fc9ae8c
Add tests for CreateDecrypter 3 years ago
Herman Slatman 68d5f6d0d2
Merge branch 'master' into hs/scep 3 years ago
Mariano Cano 180b5c3e3c Fix typo. 3 years ago