-
Notifications
You must be signed in to change notification settings - Fork 7
/
types.go
34 lines (27 loc) · 938 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Package tresor implements the certificate.Manager interface for Tresor, a custom certificate provider in FSM.
package tresor
import (
"math/big"
"github.com/flomesh-io/fsm/pkg/certificate"
"github.com/flomesh-io/fsm/pkg/logger"
)
const (
// How many bits to use for the RSA key
rsaBits = 2048
// How many bits in the certificate serial number
certSerialNumberBits = 128
// The organization name to be used in the certificates
//lint:ignore U1000 Ignore unused variable
testCertOrgName = "Flomesh Service Mesh Tresor"
)
var (
log = logger.New("tresor")
serialNumberLimit = new(big.Int).Lsh(big.NewInt(1), certSerialNumberBits)
)
// CertManager implements certificate.Manager
type CertManager struct {
// The Certificate Authority root certificate to be used by this certificate manager
ca *certificate.Certificate
certificatesOrganization string
keySize int
}