Browse Source

Update softcas.go

Miclain K Keffeler 6 years ago
parent
commit
f3396bf964
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cas/softcas/softcas.go

+ 2 - 2
cas/softcas/softcas.go

@@ -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 {
-		case opts.CertificateChain == nil:
+		switch {			
+		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")