Skip to content

Commit deecaa9

Browse files
authored
fix: Remove duplicate authority key identifier extension (#766)
Without removing this duplicate extension, the Go X.509 parsing code would error out stating that the "certificate contains duplicate extensions", which was indeed correct. We accidentially included the authority key identifier twice, once in the leaf profile and once by manually adding the extention after building the cert. We now removed the manually added extension. This resolved the Go error and the HTTP client was able to establish a TLS-secured connection to the dummy webhook. See merge: https://go-review.googlesource.com/c/go/+/383215 See code: https://github.com/golang/go/blob/315b6ae682a2a4e7718924a45b8b311a0fe10043/src/crypto/x509/parser.go#L965-L968
1 parent e50f53d commit deecaa9

File tree

1 file changed

+0
-5
lines changed
  • crates/stackable-certs/src/ca

1 file changed

+0
-5
lines changed

crates/stackable-certs/src/ca/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ where
304304
// The leaf certificate can be used for WWW client and server
305305
// authentication. This is a base requirement for TLS certs.
306306
let eku = ExtendedKeyUsage(vec![ID_KP_CLIENT_AUTH, ID_KP_SERVER_AUTH]);
307-
let aki = AuthorityKeyIdentifier::try_from(spki.owned_to_ref())
308-
.context(ParseAuthorityKeyIdentifierSnafu)?;
309307

310308
let signer = self.certificate_pair.key_pair.signing_key();
311309
let mut builder = CertificateBuilder::new(
@@ -331,9 +329,6 @@ where
331329
builder
332330
.add_extension(&eku)
333331
.context(AddCertificateExtensionSnafu)?;
334-
builder
335-
.add_extension(&aki)
336-
.context(AddCertificateExtensionSnafu)?;
337332

338333
debug!("create and sign leaf certificate");
339334
let certificate = builder.build().context(BuildCertificateSnafu)?;

0 commit comments

Comments
 (0)