Skip to content

Commit

Permalink
Rebase from main
Browse files Browse the repository at this point in the history
Signed-off-by: nyagamunene <[email protected]>
  • Loading branch information
nyagamunene committed Sep 24, 2024
1 parent f41db55 commit 554a554
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion postgres/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Migration() *migrate.MemoryMigrationSource {
revoked BOOLEAN,
expiry_time TIMESTAMP,
entity_id VARCHAR(36),
type TEXT CHECK (type IN ('RootCA', 'IntermediateCA', 'ClientCert')),
type TEXT CHECK (type IN ('RootCA', 'IntermediateCA', 'ClientCert')),
PRIMARY KEY (serial_number)
)`,
},
Expand Down
24 changes: 13 additions & 11 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,17 +86,19 @@ type CA struct {
}

var (
serialNumberLimit = new(big.Int).Lsh(big.NewInt(1), 128)
ErrNotFound = errors.New("entity not found")
ErrConflict = errors.New("entity already exists")
ErrCreateEntity = errors.New("failed to create entity")
ErrViewEntity = errors.New("view entity failed")
ErrGetToken = errors.New("failed to get token")
ErrUpdateEntity = errors.New("update entity failed")
ErrMalformedEntity = errors.New("malformed entity specification")
ErrRootCANotFound = errors.New("root CA not found")
ErrCertExpired = errors.New("certificate expired before renewal")
ErrCertRevoked = errors.New("certificate has been revoked and cannot be renewed")
serialNumberLimit = new(big.Int).Lsh(big.NewInt(1), 128)
ErrNotFound = errors.New("entity not found")
ErrConflict = errors.New("entity already exists")
ErrCreateEntity = errors.New("failed to create entity")
ErrViewEntity = errors.New("view entity failed")
ErrGetToken = errors.New("failed to get token")
ErrUpdateEntity = errors.New("update entity failed")
ErrMalformedEntity = errors.New("malformed entity specification")
ErrRootCANotFound = errors.New("root CA not found")
ErrIntermediateCANotFound = errors.New("intermediate CA not found")
ErrCertExpired = errors.New("certificate expired before renewal")
ErrCertRevoked = errors.New("certificate has been revoked and cannot be renewed")
ErrCertInvalidType = errors.New("invalid cert type")
)

type SubjectOptions struct {
Expand Down

0 comments on commit 554a554

Please sign in to comment.