Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for is_ca (0.05 sec)

  1. security/pkg/pki/util/keycertbundle_test.go

    	}
    	if actual.TTL != expected.TTL {
    		t.Errorf("TTL does not match")
    	}
    	if actual.Org != expected.Org {
    		t.Errorf("Org does not match")
    	}
    	if actual.IsCA != expected.IsCA {
    		t.Errorf("IsCA does not match")
    	}
    	if actual.RSAKeySize != expected.RSAKeySize {
    		t.Errorf("RSAKeySize does not match")
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Jan 21 06:07:50 UTC 2024
    - 15.8K bytes
    - Viewed (0)
  2. security/pkg/pki/util/keycertbundle.go

    	}
    	if len(ids) != 1 {
    		return nil, fmt.Errorf("expect single id from the cert, found %v", ids)
    	}
    
    	opts := &CertOptions{
    		Host:      ids[0],
    		Org:       b.cert.Issuer.Organization[0],
    		IsCA:      b.cert.IsCA,
    		TTL:       b.cert.NotAfter.Sub(b.cert.NotBefore),
    		IsDualUse: ids[0] == b.cert.Subject.CommonName,
    	}
    
    	switch (*b.privKey).(type) {
    	case *rsa.PrivateKey:
    		size, err := GetRSAKeySize(*b.privKey)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Jan 21 06:07:50 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. src/crypto/x509/x509.go

    	UnknownExtKeyUsage []asn1.ObjectIdentifier // Encountered extended key usages unknown to this package.
    
    	// BasicConstraintsValid indicates whether IsCA, MaxPathLen,
    	// and MaxPathLenZero are valid.
    	BasicConstraintsValid bool
    	IsCA                  bool
    
    	// MaxPathLen and MaxPathLenZero indicate the presence and
    	// value of the BasicConstraints' "pathLenConstraint".
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 09:20:15 UTC 2024
    - 82K bytes
    - Viewed (0)
  4. src/crypto/x509/hybrid_pool_test.go

    	}
    	googChain := c.ConnectionState().PeerCertificates
    
    	rootTmpl := &x509.Certificate{
    		SerialNumber:          big.NewInt(1),
    		Subject:               pkix.Name{CommonName: "Go test root"},
    		IsCA:                  true,
    		BasicConstraintsValid: true,
    		NotBefore:             time.Now().Add(-time.Hour),
    		NotAfter:              time.Now().Add(time.Hour * 10),
    	}
    	k, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:48:11 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    		NotBefore:             notBefore,
    		NotAfter:              notAfter,
    		KeyUsage:              keyUsage,
    		ExtKeyUsage:           cfg.Usages,
    		BasicConstraintsValid: true,
    		IsCA:                  isCA,
    	}
    	certDERBytes, err := x509.CreateCertificate(cryptorand.Reader, &certTmpl, caCert, key.Public(), caKey)
    	if err != nil {
    		return nil, err
    	}
    	return x509.ParseCertificate(certDERBytes)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  6. pilot/pkg/trustbundle/trustbundle.go

    		return fmt.Errorf("failed to decode pem certificate")
    	}
    	cert, err := x509.ParseCertificate(block.Bytes)
    	if err != nil {
    		return fmt.Errorf("failed to parse X.509 certificate: %v", err)
    	}
    	if !cert.IsCA {
    		return fmt.Errorf("certificate is not a CA certificate")
    	}
    	return nil
    }
    
    func (tb *TrustBundle) mergeInternal() {
    	var mergeCerts []string
    	certMap := sets.New[string]()
    
    	tb.mutex.Lock()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. src/crypto/x509/x509_test.go

    		BasicConstraintsValid: true,
    		IsCA:                  false,
    	}
    	if m := serialiseAndParse(t, template).MaxPathLen; m != -1 {
    		t.Errorf("MaxPathLen should be -1 when IsCa is false, got %d", m)
    	}
    
    	template.MaxPathLen = -1
    	if m := serialiseAndParse(t, template).MaxPathLen; m != -1 {
    		t.Errorf("MaxPathLen should be -1 when IsCa is false and MaxPathLen set to -1, got %d", m)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  8. src/crypto/x509/parser.go

    }
    
    func parseBasicConstraintsExtension(der cryptobyte.String) (bool, int, error) {
    	var isCA bool
    	if !der.ReadASN1(&der, cryptobyte_asn1.SEQUENCE) {
    		return false, 0, errors.New("x509: invalid basic constraints")
    	}
    	if der.PeekASN1Tag(cryptobyte_asn1.BOOLEAN) {
    		if !der.ReadASN1Boolean(&isCA) {
    			return false, 0, errors.New("x509: invalid basic constraints")
    		}
    	}
    	maxPathLen := -1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  9. src/crypto/x509/verify_test.go

    		KeyUsage:              KeyUsageKeyEncipherment | KeyUsageDigitalSignature | KeyUsageCertSign,
    		ExtKeyUsage:           []ExtKeyUsage{ExtKeyUsageServerAuth},
    		BasicConstraintsValid: true,
    		IsCA:                  isCA,
    	}
    	if issuer == nil {
    		issuer = template
    		issuerKey = priv
    	}
    
    	derBytes, err := CreateCertificate(rand.Reader, template, issuer, priv.Public(), issuerKey)
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 110.2K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/server/options/serving_test.go

    		KeyUsage:              x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
    		ExtKeyUsage:           []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
    		BasicConstraintsValid: true,
    		IsCA:                  true,
    	}
    
    	if ip := netutils.ParseIPSloppy(host); ip != nil {
    		template.IPAddresses = append(template.IPAddresses, ip)
    	} else {
    		template.DNSNames = append(template.DNSNames, host)
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 09 15:52:39 UTC 2024
    - 13.8K bytes
    - Viewed (0)
Back to top