Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 150 for caerror (0.16 sec)

  1. security/pkg/nodeagent/test/mock/caserver.go

    	return response, nil
    }
    
    func (s *CAServer) sign(csrPEM []byte, subjectIDs []string, _ time.Duration, forCA bool) ([]byte, error) {
    	csr, err := util.ParsePemEncodedCSR(csrPEM)
    	if err != nil {
    		caServerLog.Errorf("failed to parse CSR: %+v", err)
    		return nil, caerror.NewError(caerror.CSRError, err)
    	}
    	signingCert, signingKey, _, _ := s.KeyCertBundle.GetAll()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  2. security/pkg/server/ca/fuzz_test.go

    	"istio.io/istio/pkg/security"
    	mockca "istio.io/istio/security/pkg/pki/ca/mock"
    	caerror "istio.io/istio/security/pkg/pki/error"
    )
    
    func FuzzCreateCertificate(f *testing.F) {
    	fuzz.Fuzz(f, func(fg fuzz.Helper) {
    		csr := fuzz.Struct[pb.IstioCertificateRequest](fg)
    		ca := fuzz.Struct[mockca.FakeCA](fg)
    		ca.SignErr = caerror.NewError(caerror.CSRError, fmt.Errorf("cannot sign"))
    		server := &Server{
    			ca:             &ca,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 15 21:32:54 UTC 2022
    - 1.3K bytes
    - Viewed (0)
  3. security/pkg/server/ca/server_test.go

    			ca:             &mockca.FakeCA{SignErr: caerror.NewError(caerror.CANotReady, fmt.Errorf("cannot sign"))},
    			code:           codes.Internal,
    		},
    		"Invalid CSR": {
    			authenticators: []security.Authenticator{&mockAuthenticator{identities: []string{"test-identity"}}},
    			ca:             &mockca.FakeCA{SignErr: caerror.NewError(caerror.CSRError, fmt.Errorf("cannot sign"))},
    			code:           codes.InvalidArgument,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Feb 28 16:41:38 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  4. security/pkg/pki/ca/ca.go

    	signingCert, signingKey, _, _ := ca.keyCertBundle.GetAll()
    	if signingCert == nil {
    		return nil, caerror.NewError(caerror.CANotReady, fmt.Errorf("Istio CA is not ready")) // nolint
    	}
    
    	csr, err := util.ParsePemEncodedCSR(csrPEM)
    	if err != nil {
    		return nil, caerror.NewError(caerror.CSRError, err)
    	}
    
    	if err := csr.CheckSignature(); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 30 19:33:26 UTC 2023
    - 17.2K bytes
    - Viewed (0)
  5. security/pkg/pki/ca/mock/fakeca.go

    // limitations under the License.
    
    package mock
    
    import (
    	"istio.io/istio/security/pkg/pki/ca"
    	caerror "istio.io/istio/security/pkg/pki/error"
    	"istio.io/istio/security/pkg/pki/util"
    )
    
    // FakeCA is a mock of CertificateAuthority.
    type FakeCA struct {
    	SignedCert    []byte
    	SignErr       *caerror.Error
    	KeyCertBundle *util.KeyCertBundle
    	ReceivedIDs   []string
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Dec 03 18:57:19 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  6. security/pkg/server/ca/server.go

    		return nil, status.Errorf(signErr.(*caerror.Error).HTTPErrorCode(), "CSR signing error (%v)", signErr.(*caerror.Error))
    	}
    	if certSigner == "" {
    		respCertChain = []string{string(cert)}
    		if len(certChainBytes) != 0 {
    			respCertChain = append(respCertChain, string(certChainBytes))
    			serverCaLog.Debugf("Append cert chain to response, %s", string(certChainBytes))
    		}
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 28 17:35:26 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. security/pkg/pki/ca/ca_test.go

    		if signErr != nil {
    			if tc.expectedError == "" {
    				t.Errorf("%s: Sign error: %v", id, err)
    			}
    			if certPEM != nil {
    				t.Errorf("%s: Expected null cert be obtained a non-null cert.", id)
    			}
    			if signErr.(*caerror.Error).Error() != tc.expectedError {
    				t.Errorf("%s: Expected error: %s but got error: %s.", id, tc.expectedError, signErr.(*caerror.Error).Error())
    			}
    			continue
    		}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 08:51:27 UTC 2023
    - 29.1K bytes
    - Viewed (0)
  8. platforms/documentation/docs/src/snippets/native-binaries/cunit/groovy/libs/cunit/2.1-2/include/CUnit/CUError.h

     *
     *  05-Sep-2004   Added internal test interface. (JDS)
     */
    
    /** @file
     *  Error handling functions (user interface).
     *  CUnit uses a simple (and conventional) error handling strategy.
     *  Functions that can generate errors set (and usually return) an
     *  error code to indicate the run status.  The error code can be
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Mon Nov 27 17:53:42 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  9. security/pkg/pki/error/error.go

    	CAInitFail
    )
    
    // Error encapsulates the short and long errors.
    type Error struct {
    	t   ErrType
    	err error
    }
    
    // Error returns the string error message.
    func (e Error) Error() string {
    	return e.err.Error()
    }
    
    // ErrorType returns a short string representing the error type.
    func (e Error) ErrorType() string {
    	switch e.t {
    	case CANotReady:
    		return "CA_NOT_READY"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Nov 13 17:41:21 UTC 2020
    - 2.1K bytes
    - Viewed (0)
  10. security/pkg/pki/ra/common.go

    	if forCA {
    		return requestedLifetime, raerror.NewError(raerror.CSRError,
    			fmt.Errorf("unable to generate CA certifificates"))
    	}
    	if !ValidateCSR(csrPEM, subjectIDs) {
    		return requestedLifetime, raerror.NewError(raerror.CSRError, fmt.Errorf(
    			"unable to validate SAN Identities in CSR"))
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Sep 11 19:57:30 UTC 2023
    - 4.4K bytes
    - Viewed (0)
Back to top