Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for AppendCertByte (0.18 sec)

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

    			return rootCerts, fmt.Errorf("failed to read root certificates (%v)", err)
    		}
    		rootCerts = AppendCertByte(pemCert, certBytes)
    	}
    	return rootCerts, nil
    }
    
    // AppendCertByte: Append x.509 rootCert in bytes to existing certificate chain (in bytes)
    func AppendCertByte(pemCert []byte, rootCert []byte) []byte {
    	rootCerts := []byte{}
    	if len(pemCert) > 0 {
    		// Copy the input certificate
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Nov 06 12:48:53 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  2. security/pkg/pki/util/crypto_test.go

    }
    
    func TestPemCertBytestoString(t *testing.T) {
    	// empty check
    	if len(PemCertBytestoString([]byte{})) != 0 {
    		t.Errorf("Empty call fails!")
    	}
    
    	certBytes := []byte(certECDSA)
    	certBytes = AppendCertByte(certBytes, []byte(certRSA))
    	result := PemCertBytestoString(certBytes)
    	cert1 := strings.TrimSuffix(strings.TrimPrefix(certECDSA, "\n"), "\n")
    	cert2 := strings.TrimSuffix(strings.TrimPrefix(certRSA, "\n"), "\n")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  3. security/pkg/nodeagent/cache/secretcache_test.go

    	u.Reset()
    
    	concatCerts := func(certs ...string) []byte {
    		expectedRootBytes := []byte{}
    		sort.Strings(certs)
    		for _, cert := range certs {
    			expectedRootBytes = pkiutil.AppendCertByte(expectedRootBytes, []byte(cert))
    		}
    		return expectedRootBytes
    	}
    
    	expectedCerts := concatCerts(string(rootCert), string(caClientRootCert))
    	// Ensure that contents of the rootCert are correct.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  4. pkg/istio-agent/xds_proxy.go

    			}
    			caCerts := pc.GetCaCertificatesPem()
    			log.Debugf("received new certificates to add to mesh trust domain: %v", caCerts)
    			trustBundle := []byte{}
    			for _, cert := range caCerts {
    				trustBundle = util.AppendCertByte(trustBundle, []byte(cert))
    			}
    			return ia.secretCache.UpdateConfigTrustBundle(trustBundle)
    		}
    	}
    
    	proxyLog.Infof("Initializing with upstream address %q and cluster %q", proxy.istiodAddress, proxy.clusterID)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 27.9K bytes
    - Viewed (0)
  5. security/pkg/nodeagent/cache/secretcache.go

    		anchors.Insert(cert)
    	}
    	for _, cert := range rootCerts {
    		anchors.Insert(cert)
    	}
    	anchorBytes := []byte{}
    	for _, cert := range sets.SortedList(anchors) {
    		anchorBytes = pkiutil.AppendCertByte(anchorBytes, []byte(cert))
    	}
    	return anchorBytes
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Mar 04 08:29:46 UTC 2024
    - 28.2K bytes
    - Viewed (0)
Back to top