Skip to content

Commit

Permalink
Use identity id instead of hostname for CA. Fixes #115
Browse files Browse the repository at this point in the history
  • Loading branch information
plorenz committed Sep 27, 2023
1 parent fc603b6 commit 0498204
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ziti/enroll/enroll.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,13 @@ func enrollUpdb(username, password string, token *ziti.EnrollmentClaims, caPool
}

func enrollOTT(token *ziti.EnrollmentClaims, cfg *ziti.Config, caPool *x509.CertPool) error {

pk, err := identity.LoadKey(cfg.ID.Key)
if err != nil {
return errors.Errorf("failed to load private key '%s': %s", cfg.ID.Key, err.Error())
}

hostname, err := os.Hostname()
if err != nil {
return err
}
request, err := certtools.NewCertRequest(map[string]string{
"C": "US", "O": "NetFoundry", "CN": hostname,
"C": "US", "O": "NetFoundry", "CN": token.Subject,
}, nil)
if err != nil {
return err
Expand Down

0 comments on commit 0498204

Please sign in to comment.