Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for parseCertificateRequest (0.21 sec)

  1. 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)
  2. src/crypto/x509/x509.go

    		SignatureAlgorithm: algorithmIdentifier,
    		SignatureValue:     asn1.BitString{Bytes: signature, BitLength: len(signature) * 8},
    	})
    }
    
    // ParseCertificateRequest parses a single certificate request from the
    // given ASN.1 DER data.
    func ParseCertificateRequest(asn1Data []byte) (*CertificateRequest, error) {
    	var csr certificateRequest
    
    	rest, err := asn1.Unmarshal(asn1Data, &csr)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:20:15 UTC 2024
    - 82K bytes
    - Viewed (0)
  3. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    	}
    
    	if block.Type != certutil.CertificateRequestBlockType {
    		return nil, errors.Errorf("expected block type %q, but PEM had type %q", certutil.CertificateRequestBlockType, block.Type)
    	}
    
    	return x509.ParseCertificateRequest(block.Bytes)
    }
    
    // CertificateRequestFromFile returns the CertificateRequest from a given PEM-encoded file.
    // Returns an error if the file could not be read or if the CSR could not be parsed.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  4. src/crypto/x509/x509_test.go

    func TestDuplicateExtensionsCSR(t *testing.T) {
    	b, _ := pem.Decode([]byte(dupExtCSR))
    	if b == nil {
    		t.Fatalf("couldn't decode test CSR")
    	}
    	_, err := ParseCertificateRequest(b.Bytes)
    	if err == nil {
    		t.Fatal("ParseCertificateRequest should fail when parsing CSR with duplicate extensions")
    	}
    }
    
    const dupAttCSR = `-----BEGIN CERTIFICATE REQUEST-----
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"PEMCipherAES128", Const, 1},
    		{"PEMCipherAES192", Const, 1},
    		{"PEMCipherAES256", Const, 1},
    		{"PEMCipherDES", Const, 1},
    		{"ParseCRL", Func, 0},
    		{"ParseCertificate", Func, 0},
    		{"ParseCertificateRequest", Func, 3},
    		{"ParseCertificates", Func, 0},
    		{"ParseDERCRL", Func, 0},
    		{"ParseECPrivateKey", Func, 1},
    		{"ParsePKCS1PrivateKey", Func, 0},
    		{"ParsePKCS1PublicKey", Func, 10},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top