Update softcas.go

This commit is contained in:
Miclain K Keffeler 2020-12-28 17:10:44 -06:00 committed by GitHub
parent e9bfa061b8
commit f3396bf964
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,8 +35,8 @@ type SoftCAS struct {
// crypto. // crypto.
func New(ctx context.Context, opts apiv1.Options) (*SoftCAS, error) { func New(ctx context.Context, opts apiv1.Options) (*SoftCAS, error) {
if !opts.IsCreator { if !opts.IsCreator {
switch { switch {
case opts.CertificateChain == nil: case len(opts.CertificateChain) == 0:
return nil, errors.New("softCAS 'CertificateChain' cannot be nil") return nil, errors.New("softCAS 'CertificateChain' cannot be nil")
case opts.Signer == nil: case opts.Signer == nil:
return nil, errors.New("softCAS 'signer' cannot be nil") return nil, errors.New("softCAS 'signer' cannot be nil")