Skip to content
This repository was archived by the owner on Apr 3, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,14 @@ func parseCertificateSection(in []byte) (*KRLCertificateSection, error) {
if err := ssh.Unmarshal(in, &header); err != nil {
return nil, fmt.Errorf("krl: while parsing certificate section header: %v", err)
}
ca, err := ssh.ParsePublicKey(header.CAKey)
if err != nil {
return nil, fmt.Errorf("krl: while parsing CA key: %v", err)
k := new(KRLCertificateSection)
if len(header.CAKey) > 0 {
ca, err := ssh.ParsePublicKey(header.CAKey)
if err != nil {
return nil, fmt.Errorf("krl: while parsing CA key: %v", err)
}
k.CA = ca
}
k := &KRLCertificateSection{CA: ca}
in = header.Rest
for len(in) > 0 {
var section krlCertificateSection
Expand Down