forked from TrueCloudLab/certificates
Do not add extra new lines when creating nebula provisioners
This commit is contained in:
parent
0920224816
commit
de549adf2d
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
package authority
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"crypto/x509"
|
||||
"encoding/json"
|
||||
|
@ -713,7 +714,7 @@ func ProvisionerToCertificates(p *linkedca.Provisioner) (provisioner.Interface,
|
|||
case *linkedca.ProvisionerDetails_Nebula:
|
||||
var roots []byte
|
||||
for i, root := range d.Nebula.GetRoots() {
|
||||
if i > 0 {
|
||||
if i > 0 && !bytes.HasSuffix(root, []byte{'\n'}) {
|
||||
roots = append(roots, '\n')
|
||||
}
|
||||
roots = append(roots, root...)
|
||||
|
|
Loading…
Reference in a new issue