Skip to content

Commit

Permalink
fix updateEntry for first domain len > 64
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWeindel committed Mar 6, 2024
1 parent 3ff6269 commit 40ed451
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/cert/source/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,13 @@ func (r *sourceReconciler) updateEntry(logger logger.LogContext, info CertInfo,
var cn *string
var dnsNames []string
if len(info.Domains) > 0 {
cn = &info.Domains[0]
dnsNames = info.Domains[1:]
if len(info.Domains[0]) <= 64 {
cn = &info.Domains[0]
dnsNames = info.Domains[1:]
} else {
cn = nil
dnsNames = info.Domains
}
}

mod.AssureStringPtrPtr(&spec.CommonName, cn)
Expand Down

0 comments on commit 40ed451

Please sign in to comment.