Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 50 for ExtKeyUsage (0.36 sec)

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

    	*x509.Certificate, error,
    ) {
    	subjectIDsInString := strings.Join(subjectIDs, ",")
    	var keyUsage x509.KeyUsage
    	extKeyUsages := []x509.ExtKeyUsage{}
    	if isCA {
    		// If the cert is a CA cert, the private key is allowed to sign other certificates.
    		keyUsage = x509.KeyUsageCertSign
    	} else {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 02 14:34:38 UTC 2023
    - 14.2K bytes
    - Viewed (0)
  2. cluster/images/etcd/migrate/integration_test.go

    		NotBefore: time.Unix(0, 0),
    		NotAfter:  time.Now().Add(time.Hour * 24 * 365 * 100),
    
    		KeyUsage:              x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
    		ExtKeyUsage:           []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth},
    		BasicConstraintsValid: true,
    		IsCA:                  true,
    	}
    
    	if ip := netutils.ParseIPSloppy(host); ip != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Mar 28 07:33:23 UTC 2022
    - 11.4K bytes
    - Viewed (0)
  3. pkg/controller/certificates/authority/authority_test.go

    			want: x509.Certificate{
    				NotBefore:             now,
    				NotAfter:              now.Add(1 * time.Hour),
    				BasicConstraintsValid: true,
    				ExtKeyUsage:           []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
    			},
    		},
    		{
    			name:   "backdate without short",
    			policy: PermissiveSigningPolicy{TTL: time.Hour, Backdate: 5 * time.Minute, Now: nowFunc},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 23 19:36:11 UTC 2021
    - 7.3K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates_test.go

    		NotBefore: time.Unix(0, 0),
    		NotAfter:  time.Now().Add(time.Hour * 24 * 365 * 100),
    
    		KeyUsage:              x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
    		ExtKeyUsage:           []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth},
    		BasicConstraintsValid: true,
    		IsCA:                  true,
    	}
    
    	if ip := netutils.ParseIPSloppy(host); ip != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 20 08:42:09 UTC 2021
    - 8K bytes
    - Viewed (0)
  5. src/crypto/x509/verify.go

    			if matchExactly(match, candidateName) {
    				return nil
    			}
    		}
    	}
    
    	return HostnameError{c, h}
    }
    
    func checkChainForKeyUsage(chain []*Certificate, keyUsages []ExtKeyUsage) bool {
    	usages := make([]ExtKeyUsage, len(keyUsages))
    	copy(usages, keyUsages)
    
    	if len(chain) == 0 {
    		return false
    	}
    
    	usagesRemaining := len(usages)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:58:39 UTC 2024
    - 35.7K bytes
    - Viewed (0)
  6. cmd/kubeadm/app/phases/certs/certlist_test.go

    			BaseName: "test-ca",
    		},
    		{
    			config: pkiutil.CertConfig{
    				Config: certutil.Config{
    					AltNames: certutil.AltNames{
    						DNSNames: []string{"test-domain.space"},
    					},
    					Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
    				},
    			},
    			configMutators: []configMutatorsFunc{
    				setCommonNameToNodeName(),
    			},
    			CAName:   "test-ca",
    			Name:     "test-daughter",
    			BaseName: "test-daughter",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  7. cmd/kubeadm/test/kubeconfig/util.go

    	// Assert the clientCert has expected NotAfter
    	certstestutil.AssertCertificateHasNotAfter(t, currentClientCert, expectedNotAfter)
    
    	// Asserts the clientCert has ClientAuth ExtKeyUsage
    	certstestutil.AssertCertificateHasClientAuthUsage(t, currentClientCert)
    
    	// Asserts the clientCert has expected expectedUserName as CommonName
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  8. src/crypto/x509/root_darwin.go

    		if err := chain[0][0].VerifyHostname(opts.DNSName); err != nil {
    			return nil, err
    		}
    	}
    
    	keyUsages := opts.KeyUsages
    	if len(keyUsages) == 0 {
    		keyUsages = []ExtKeyUsage{ExtKeyUsageServerAuth}
    	}
    
    	// If any key usage is acceptable then we're done.
    	for _, usage := range keyUsages {
    		if usage == ExtKeyUsageAny {
    			return chain, nil
    		}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 01 00:36:38 UTC 2023
    - 3.5K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/util/pkiutil/pki_helpers.go

    	}
    
    	return csr, key, nil
    }
    
    // HasServerAuth returns true if the given certificate is a ServerAuth
    func HasServerAuth(cert *x509.Certificate) bool {
    	for i := range cert.ExtKeyUsage {
    		if cert.ExtKeyUsage[i] == x509.ExtKeyUsageServerAuth {
    			return true
    		}
    	}
    	return false
    }
    
    // WriteCertAndKey stores certificate and key at the specified location
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 01 16:01:49 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  10. cmd/kubelet/app/server_bootstrap_test.go

    		Subject:      pkix.Name{Organization: []string{"Acme Co"}},
    		NotBefore:    from,
    		NotAfter:     to,
    
    		KeyUsage:              x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature,
    		ExtKeyUsage:           []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
    		BasicConstraintsValid: true,
    	}
    	certRaw, err := x509.CreateCertificate(rand.Reader, cert, cert, key.Public(), key)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Feb 01 05:59:41 UTC 2022
    - 10.5K bytes
    - Viewed (0)
Back to top