Use local paths when possible, some AI cleanup

This commit is contained in:
2025-05-16 21:20:39 -04:00
parent 4f6365d453
commit 2f6d3c9bb2
7 changed files with 21 additions and 25 deletions

View File

@ -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

View File

@ -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)
}