Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for ParseCertificateRequest (0.27 sec)

  1. pkg/apis/certificates/v1/helpers.go

    	block, _ := pem.Decode(pemBytes)
    	if block == nil || block.Type != "CERTIFICATE REQUEST" {
    		return nil, errors.New("PEM block type must be CERTIFICATE REQUEST")
    	}
    	csr, err := x509.ParseCertificateRequest(block.Bytes)
    	if err != nil {
    		return nil, err
    	}
    	return csr, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 05 04:47:24 UTC 2020
    - 1K bytes
    - Viewed (0)
  2. pkg/apis/certificates/v1beta1/helpers.go

    	block, _ := pem.Decode(pemBytes)
    	if block == nil || block.Type != "CERTIFICATE REQUEST" {
    		return nil, errors.New("PEM block type must be CERTIFICATE REQUEST")
    	}
    	csr, err := x509.ParseCertificateRequest(block.Bytes)
    	if err != nil {
    		return nil, err
    	}
    	return csr, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 27 10:17:55 UTC 2020
    - 1K bytes
    - Viewed (0)
  3. pkg/controller/certificates/authority/authority.go

    // Sign signs a certificate request, applying a SigningPolicy and returns a DER
    // encoded x509 certificate.
    func (ca *CertificateAuthority) Sign(crDER []byte, policy SigningPolicy) ([]byte, error) {
    	cr, err := x509.ParseCertificateRequest(crDER)
    	if err != nil {
    		return nil, fmt.Errorf("unable to parse certificate request: %v", err)
    	}
    	if err := cr.CheckSignature(); err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 23 19:36:11 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  4. security/pkg/pki/util/generate_csr_test.go

    			} else {
    				t.Errorf("%s: failed to gen CSR", id)
    			}
    		}
    
    		pemBlock, _ := pem.Decode(csrPem)
    		if pemBlock == nil {
    			t.Fatalf("%s: failed to decode csr", id)
    		}
    		csr, err := x509.ParseCertificateRequest(pemBlock.Bytes)
    		if err != nil {
    			t.Fatalf("%s: failed to parse csr", id)
    		}
    		if err = csr.CheckSignature(); err != nil {
    			t.Errorf("%s: csr signature is invalid", id)
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Feb 25 09:40:13 UTC 2022
    - 5.5K bytes
    - Viewed (0)
  5. pkg/test/csrctrl/authority/authority.go

    		now = ca.Now()
    	}
    
    	nbf := now.Add(-ca.Backdate)
    	if !nbf.Before(ca.Certificate.NotAfter) {
    		return nil, fmt.Errorf("the signer has expired: NotAfter=%v", ca.Certificate.NotAfter)
    	}
    
    	cr, err := x509.ParseCertificateRequest(crDER)
    	if err != nil {
    		return nil, fmt.Errorf("unable to parse certificate request: %v", err)
    	}
    	if err := cr.CheckSignature(); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jul 28 18:22:37 UTC 2021
    - 3K bytes
    - Viewed (0)
  6. pkg/apis/certificates/helpers.go

    	block, _ := pem.Decode(pemBytes)
    	if block == nil || block.Type != "CERTIFICATE REQUEST" {
    		return nil, errors.New("PEM block type must be CERTIFICATE REQUEST")
    	}
    	csr, err := x509.ParseCertificateRequest(block.Bytes)
    	if err != nil {
    		return nil, err
    	}
    	return csr, nil
    }
    
    var (
    	organizationNotSystemNodesErr = fmt.Errorf("subject organization is not system:nodes")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 27 08:04:25 UTC 2022
    - 4K bytes
    - Viewed (0)
  7. security/pkg/pki/util/crypto.go

    	block, _ := pem.Decode(csrBytes)
    	if block == nil {
    		return nil, fmt.Errorf("certificate signing request is not properly encoded")
    	}
    	csr, err := x509.ParseCertificateRequest(block.Bytes)
    	if err != nil {
    		return nil, fmt.Errorf("failed to parse X.509 certificate signing request")
    	}
    	return csr, nil
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top