Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for NewCertUtil (0.1 sec)

  1. security/pkg/util/certutil.go

    }
    
    // CertUtilImpl is the implementation of CertUtil, for production use.
    type CertUtilImpl struct {
    	gracePeriodPercentage int
    }
    
    // NewCertUtil returns a new CertUtilImpl
    func NewCertUtil(gracePeriodPercentage int) CertUtilImpl {
    	return CertUtilImpl{
    		gracePeriodPercentage: gracePeriodPercentage,
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 30 19:33:26 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  2. security/pkg/util/certutil_test.go

    		},
    		"Invalid cert pem": {
    			cert:        []byte(`INVALIDCERT`),
    			now:         time.Date(2017, time.August, 23, 21, 0, 0, 40, time.UTC),
    			expectedErr: "invalid PEM encoded certificate",
    		},
    	}
    
    	cu := NewCertUtil(50) // Grace period percentage is set to 50
    	for id, c := range testCases {
    		waitTime, err := cu.GetWaitTime(c.cert, c.now)
    		if c.expectedErr != "" {
    			if err == nil {
    				t.Errorf("%s: no error is returned.", id)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 30 19:33:26 UTC 2023
    - 3.1K bytes
    - Viewed (0)
Back to top