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w83+1ahaxUGs4SkeExmuECrcPM7P0rBRxOIFmGWlDHIAgFdQYhiE6l34vghA8b1O
|
|
|
|
|
CV5oRRYL84jl7M/S3wJBALDfL5YXcc8P6scLJJ1biqhLYppvGN5CUwbsJsluvHCW
|
|
|
|
|
XCTVIbPOaS42A0xUfpoiTcdbNSFRvdCzPR5nsGy8Y7g=
|
|
|
|
|
-----END RSA PRIVATE KEY-----`
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestInlineCertificate(t *testing.T) {
|
|
|
|
@ -140,6 +155,15 @@ func TestInlineCertificate(t *testing.T) {
|
|
|
|
|
},
|
|
|
|
|
validateErr: "failed to parse certificate PEM",
|
|
|
|
|
},
|
|
|
|
|
"invalid private key length": {
|
|
|
|
|
entry: &InlineCertificateConfigEntry{
|
|
|
|
|
Kind: InlineCertificate,
|
|
|
|
|
Name: "cert-two",
|
|
|
|
|
PrivateKey: tooShortPrivateKey,
|
|
|
|
|
Certificate: "foo",
|
|
|
|
|
},
|
|
|
|
|
validateErr: "key length must be at least 2048 bits",
|
|
|
|
|
},
|
|
|
|
|
"mismatched certificate": {
|
|
|
|
|
entry: &InlineCertificateConfigEntry{
|
|
|
|
|
Kind: InlineCertificate,
|
|
|
|
|