Skip to content

Commit 0ff490f

Browse files
authored
Merge pull request #81 from mutablelogic/v5
Updated to remove dependencies
2 parents 617343a + b4937b5 commit 0ff490f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

pkg/httpserver/tls.go

+9-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ import (
77
"fmt"
88
"io"
99
"os"
10+
)
11+
12+
///////////////////////////////////////////////////////////////////////////////
13+
// GLOBALS
1014

11-
// Packages
12-
"github.com/mutablelogic/go-service/pkg/cert/schema"
15+
const (
16+
PemTypePrivateKey = "PRIVATE KEY"
17+
PemTypeCertificate = "CERTIFICATE"
1318
)
1419

1520
///////////////////////////////////////////////////////////////////////////////
@@ -65,9 +70,9 @@ func readPemBlocks(data []byte) ([]byte, []byte, error) {
6570

6671
// Set certificate or key
6772
switch block.Type {
68-
case schema.PemTypePrivateKey:
73+
case PemTypePrivateKey:
6974
key = pem.EncodeToMemory(block)
70-
case schema.PemTypeCertificate:
75+
case PemTypeCertificate:
7176
cert = pem.EncodeToMemory(block)
7277
default:
7378
return nil, nil, fmt.Errorf("invalid PEM block type: %q", block.Type)

0 commit comments

Comments
 (0)