Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for pem (0.15 sec)

  1. docs/debugging/inspect/main.go

    	privateKeyBlock := &pem.Block{
    		Type:  "RSA PRIVATE KEY",
    		Bytes: privateKeyBytes,
    	}
    	privatePem, err := os.Create("support_private.pem")
    	if err != nil {
    		fmt.Printf("error when create private.pem: %s n", err)
    		os.Exit(1)
    	}
    	err = pem.Encode(privatePem, privateKeyBlock)
    	if err != nil {
    		fmt.Printf("error when encode private pem: %s n", err)
    		os.Exit(1)
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 11 21:22:47 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  2. istioctl/pkg/writer/ztunnel/configdump/api.go

    }
    
    type CertsDump struct {
    	Identity  string  `json:"identity"`
    	State     string  `json:"state"`
    	CertChain []*Cert `json:"certChain"`
    }
    
    type Cert struct {
    	Pem            string `json:"pem"`
    	SerialNumber   string `json:"serialNumber"`
    	ValidFrom      string `json:"validFrom"`
    	ExpirationTime string `json:"expirationTime"`
    }
    
    type WorkloadState struct {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Thu Apr 25 02:16:06 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  3. cmd/common-main.go

    					if err != nil {
    						return tls.Certificate{}, fmt.Errorf("Unable to decrypt KES client private key as specified by the shell environment: %v", err)
    					}
    					keyBytes = pem.EncodeToMemory(&pem.Block{Type: privateKeyPEM.Type, Bytes: keyBytes})
    				}
    				certificate, err := tls.X509KeyPair(certBytes, keyBytes)
    				if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat May 04 00:17:57 GMT 2024
    - 35.8K bytes
    - Viewed (2)
  4. internal/config/certs.go

    	data = bytes.TrimSpace(data)
    
    	// Parse all certs in the chain.
    	current := data
    	for len(current) > 0 {
    		var pemBlock *pem.Block
    		if pemBlock, current = pem.Decode(current); pemBlock == nil {
    			return nil, ErrTLSUnexpectedData(nil).Msg("Could not read PEM block from file %s", certFile)
    		}
    
    		var x509Cert *x509.Certificate
    		if x509Cert, err = x509.ParseCertificate(pemBlock.Bytes); err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 3.8K bytes
    - Viewed (0)
  5. internal/event/target/nats_tls_contrib_test.go

    		},
    		Subject:       "test",
    		Secure:        true,
    		CertAuthority: path.Join("testdata", "contrib", "certs", "root_ca_cert.pem"),
    		ClientCert:    path.Join("testdata", "contrib", "certs", "nats_client_cert.pem"),
    		ClientKey:     path.Join("testdata", "contrib", "certs", "nats_client_key.pem"),
    	}
    
    	con, err := clientConfig.connectNats()
    	if err != nil {
    		t.Errorf("Could not connect to nats: %v", err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 04 19:57:37 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  6. docs/debugging/inspect/utils.go

    package main
    
    import (
    	"crypto/rsa"
    	"crypto/x509"
    	"encoding/base64"
    	"encoding/pem"
    	"log"
    )
    
    func bytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error) {
    	// Try PEM
    	if block, _ := pem.Decode(priv); block != nil {
    		return x509.ParsePKCS1PrivateKey(block.Bytes)
    	}
    	// Try base 64
    	dst := make([]byte, base64.StdEncoding.DecodedLen(len(priv)))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Nov 02 20:36:38 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  7. istioctl/pkg/workload/workload.go

    	if err != nil {
    		return fmt.Errorf("configmap %s was not found in namespace %s: %v", controller.CACertNamespaceConfigMap, wg.Namespace, err)
    	}
    	if err = os.WriteFile(filepath.Join(dir, "root-cert.pem"), []byte(rootCert.Data[constants.CACertNamespaceConfigMapDataName]), filePerms); err != nil {
    		return err
    	}
    
    	serviceAccount := wg.Spec.Template.ServiceAccount
    	tokenPath := filepath.Join(dir, "istio-token")
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Apr 17 20:06:41 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  8. istioctl/pkg/util/configdump/workload.go

    }
    
    type CertsDump struct {
    	Identity  string  `json:"identity"`
    	State     string  `json:"state"`
    	CertChain []*Cert `json:"cert_chain"`
    }
    
    type Cert struct {
    	Pem            string `json:"pem"`
    	SerialNumber   string `json:"serial_number"`
    	ValidFrom      string `json:"valid_from"`
    	ExpirationTime string `json:"expiration_time"`
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Fri Mar 22 16:24:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. istioctl/pkg/writer/compare/sds/util.go

    	}
    
    	return secret, nil
    }
    
    func secretMetaFromCert(rawCert []byte) (SecretMeta, error) {
    	block, _ := pem.Decode(rawCert)
    	if block == nil {
    		return SecretMeta{}, fmt.Errorf("failed to parse certificate PEM")
    	}
    	cert, err := x509.ParseCertificate(block.Bytes)
    	if err != nil {
    		return SecretMeta{}, err
    	}
    	var certType string
    	if cert.IsCA {
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Tue Jun 06 15:14:48 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  10. istioctl/pkg/workload/workload_test.go

    			verifyTestcaseOutput(t, Cmd(cli.NewFakeContext(nil)), c)
    		})
    	}
    }
    
    var generated = map[string]bool{
    	"hosts":         true,
    	"istio-token":   true,
    	"mesh.yaml":     true,
    	"root-cert.pem": true,
    	"cluster.env":   true,
    }
    
    const goldenSuffix = ".golden"
    
    // TestWorkloadEntryConfigure enumerates test cases based on subdirectories of testdata/vmconfig.
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Mar 27 16:59:05 GMT 2024
    - 14.6K bytes
    - Viewed (0)
Back to top