Print some basic configuration info on startup

This commit is contained in:
Carl Tashian 2022-03-21 16:55:09 -07:00
parent 823170ef57
commit baf3c40fef
2 changed files with 11 additions and 2 deletions

View file

@ -294,8 +294,6 @@ func (a *Authority) init() error {
return err
}
a.rootX509Certs = append(a.rootX509Certs, resp.RootCertificate)
sum := sha256.Sum256(resp.RootCertificate.Raw)
log.Printf("Using root fingerprint '%s'", hex.EncodeToString(sum[:]))
}
}
@ -313,6 +311,7 @@ func (a *Authority) init() error {
for _, crt := range a.rootX509Certs {
sum := sha256.Sum256(crt.Raw)
a.certificates.Store(hex.EncodeToString(sum[:]), crt)
log.Printf("X.509 Root Fingerprint: %s", hex.EncodeToString(sum[:]))
}
a.rootX509CertPool = x509.NewCertPool()
@ -541,6 +540,13 @@ func (a *Authority) init() error {
a.templates.Data["Step"] = tmplVars
}
if tmplVars.SSH.HostKey != nil {
log.Printf("SSH Host CA Key: %s\n", ssh.MarshalAuthorizedKey(tmplVars.SSH.HostKey))
}
if tmplVars.SSH.HostKey != nil {
log.Printf("SSH User CA Key: %s\n", ssh.MarshalAuthorizedKey(tmplVars.SSH.UserKey))
}
// JWT numeric dates are seconds.
a.startTime = time.Now().Truncate(time.Second)
// Set flag indicating that initialization has been completed, and should

View file

@ -288,6 +288,9 @@ func (ca *CA) Run() error {
var wg sync.WaitGroup
errs := make(chan error, 1)
log.Printf("Documentation: https://u.step.sm/docs/ca")
log.Printf("Config File: %s", ca.opts.configFile)
if ca.insecureSrv != nil {
wg.Add(1)
go func() {