Skip to content

crypto/x509: AKI is left blank even for non-self-signed cert when subject matches CA's subject field #20002

Description

@mikesmitty

What version of Go are you using (go version)?

1.8.1

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN="/home/dev/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/dev/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build983119777=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

Signing any TLS certificates with a matching Subject hits the self-signed cert AKI logic, ignoring the key pairs used, serial number, extensions, and SAN fields. This potentially leaves the AKI field blank even on non-self-signed certs.

What did you expect to see?

The AKI field on a signed certificate should match the CA's SKI

What did you see instead?

The AKI is left blank:
https://play.golang.org/p/MPSqzlITG7

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions