Use local paths when possible, some AI cleanup
This commit is contained in:
@ -1,15 +1,11 @@
|
||||
package pki
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/rsa"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
// ParseCSRFromBytes parses a PEM-encoded CSR from bytes
|
||||
|
@ -87,7 +87,7 @@ func TestSignCertificateRequest(t *testing.T) {
|
||||
|
||||
// Sign CSR
|
||||
certPath := filepath.Join(tempDir, "node.crt")
|
||||
err = SignCertificateRequest(caKeyPath, caCertPath, csrData, certPath, 30) // 30 days validity
|
||||
err = SignCertificateRequest(caKeyPath, caCertPath, string(csrData), certPath, 30) // 30 days validity
|
||||
if err != nil {
|
||||
t.Fatalf("SignCertificateRequest failed: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user