Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 425 for x509 (0.04 sec)

  1. staging/src/k8s.io/apiserver/pkg/server/dynamiccertificates/named_certificates_test.go

    		return nil, nil, err
    	}
    
    	template := x509.Certificate{
    		SerialNumber: big.NewInt(1),
    		Subject: pkix.Name{
    			CommonName: fmt.Sprintf("%s@%d", host, time.Now().Unix()),
    		},
    		NotBefore: time.Unix(0, 0),
    		NotAfter:  time.Now().Add(time.Hour * 24 * 365 * 100),
    
    		KeyUsage:              x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Aug 20 08:42:09 UTC 2021
    - 8K bytes
    - Viewed (0)
  2. pkg/apis/certificates/helpers.go

    limitations under the License.
    */
    
    package certificates
    
    import (
    	"crypto/x509"
    	"encoding/pem"
    	"errors"
    	"fmt"
    	"reflect"
    	"strings"
    
    	"k8s.io/apimachinery/pkg/util/sets"
    )
    
    // ParseCSR extracts the CSR from the bytes and decodes it.
    func ParseCSR(pemBytes []byte) (*x509.CertificateRequest, error) {
    	block, _ := pem.Decode(pemBytes)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 27 08:04:25 UTC 2022
    - 4K bytes
    - Viewed (0)
  3. pkg/spiffe/spiffe.go

    type PeerCertVerifier struct {
    	generalCertPool *x509.CertPool
    	certPools       map[string]*x509.CertPool
    }
    
    // NewPeerCertVerifier returns a new PeerCertVerifier.
    func NewPeerCertVerifier() *PeerCertVerifier {
    	return &PeerCertVerifier{
    		generalCertPool: x509.NewCertPool(),
    		certPools:       make(map[string]*x509.CertPool),
    	}
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 21:07:03 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/util/pubkeypin/pubkeypin_test.go

    `
    
    // testCert is a small helper to get a test x509.Certificate from the PEM constants
    func testCert(t *testing.T, pemString string) *x509.Certificate {
    	// Decode the example certificate from a PEM file into a PEM block
    	pemBlock, _ := pem.Decode([]byte(pemString))
    	if pemBlock == nil {
    		t.Fatal("failed to parse test certificate PEM")
    		return nil
    	}
    
    	// Parse the PEM block into an x509.Certificate
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 13 11:38:39 UTC 2021
    - 5.9K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiserver/pkg/util/webhook/gencerts.sh

    [alt_names]
    IP.1 = 127.0.0.1
    EOF
    
    # Create a certificate authority
    openssl genrsa -out caKey.pem 2048
    openssl req -x509 -new -nodes -key caKey.pem -days 100000 -out caCert.pem -subj "/CN=${CN_BASE}_ca"
    
    # Create a second certificate authority
    openssl genrsa -out badCAKey.pem 2048
    openssl req -x509 -new -nodes -key badCAKey.pem -days 100000 -out badCACert.pem -subj "/CN=${CN_BASE}_ca"
    
    # Create an intermediate certificate authority
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Mar 25 15:57:40 UTC 2022
    - 5.7K bytes
    - Viewed (0)
  6. src/crypto/tls/generate_cert.go

    	// KeyUsage bits set in the x509.Certificate template
    	keyUsage := x509.KeyUsageDigitalSignature
    	// Only RSA subject keys should have the KeyEncipherment KeyUsage bits set. In
    	// the context of TLS this KeyUsage is particular to RSA key exchange and
    	// authentication.
    	if _, isRSA := priv.(*rsa.PrivateKey); isRSA {
    		keyUsage |= x509.KeyUsageKeyEncipherment
    	}
    
    	var notBefore time.Time
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 08 15:22:02 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  7. pkg/test/csrctrl/authority/authority.go

    	// RawKey is an optional field to determine if signing cert/key pairs have changed
    	RawKey []byte
    
    	Certificate *x509.Certificate
    	PrivateKey  crypto.Signer
    	Backdate    time.Duration
    	Now         func() time.Time
    }
    
    // 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) {
    	now := time.Now()
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jul 28 18:22:37 UTC 2021
    - 3K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/authentication/request/x509/x509_test.go

    		}
    	}
    }
    
    func getDefaultVerifyOptions(t *testing.T) x509.VerifyOptions {
    	options := DefaultVerifyOptions()
    	options.Roots = getRootCertPool(t)
    	return options
    }
    
    func getRootCertPool(t *testing.T) *x509.CertPool {
    	return getRootCertPoolFor(t, rootCACert)
    }
    
    func getRootCertPoolFor(t *testing.T, certs ...string) *x509.CertPool {
    	pool := x509.NewCertPool()
    	for _, cert := range certs {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 02 23:23:03 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  9. staging/src/k8s.io/apiserver/pkg/authentication/request/x509/verify_options.go

    limitations under the License.
    */
    
    package x509
    
    import (
    	"crypto/x509"
    	"fmt"
    
    	"k8s.io/client-go/util/cert"
    )
    
    // StaticVerifierFn is a VerifyOptionFunc that always returns the same value.  This allows verify options that cannot change.
    func StaticVerifierFn(opts x509.VerifyOptions) VerifyOptionFunc {
    	return func() (x509.VerifyOptions, bool) {
    		return opts, true
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 07 19:48:24 UTC 2019
    - 2.2K bytes
    - Viewed (0)
  10. cmd/kubeadm/app/util/pubkeypin/pubkeypin.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    // Package pubkeypin provides primitives for x509 public key pinning in the
    // style of RFC7469.
    package pubkeypin
    
    import (
    	"crypto/sha256"
    	"crypto/x509"
    	"encoding/hex"
    	"strings"
    
    	"github.com/pkg/errors"
    )
    
    const (
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 13 11:38:39 UTC 2021
    - 3.8K bytes
    - Viewed (0)
Back to top