Go1.8 - Missing Authority Key Id in new root certificate
- Dominant language
- Go
- Stars
- 9.5k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Using GO 1.8, when we create a new root certificate from the certificate request like this:
```
cfssl gencert -initca ${dir_config}/csr_example.json | cfssljson -bare example
{
"CN": "example",
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "BR",
"O": "EXAMPLE1",
"OU": "EXAMPLE2"
}
],
"ca": {
"expiry": "262800h"
}
}
```
The Authority Key Id is not filled.
We believe that something here
https://github.com/cloudflare/cfssl/blob/1daaa3c66c0254e98104787c428a651408ee8382/initca/initca.go#L46
Are not filling Issuer = Subject like expected here to fill Authority Key Id
https://github.com/golang/go/blob/d4ccbd8833aa45819e903abfc4337555f1832d3c/src/crypto/x509/x509.go#L1753
Go 1.6 just check the SubjectKeyId length
https://github.com/golang/go/blob/aa1e69f3fc21795b6fab531a07008e0744ffe5bf/src/crypto/x509/x509.go#L1584
Related to #743
Contributor guide
Assessment
This issue has not been assessed yet.