Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for SupportedECSignatureAlgorithms (0.35 sec)

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

    	"encoding/pem"
    	"errors"
    	"fmt"
    	"math/big"
    	"os"
    	"strings"
    	"time"
    
    	"istio.io/istio/pkg/log"
    )
    
    // SupportedECSignatureAlgorithms are the types of EC Signature Algorithms
    // to be used in key generation (e.g. ECDSA or ED2551)
    type SupportedECSignatureAlgorithms string
    
    // SupportedEllipticCurves are the types of curves
    // to be used in key generation (e.g. P256, P384)
    type SupportedEllipticCurves string
    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. security/tools/generate_csr/main.go

    	}
    }
    
    func main() {
    	flag.Parse()
    
    	csrPem, privPem, err := util.GenCSR(util.CertOptions{
    		Host:       *host,
    		Org:        *org,
    		RSAKeySize: *keySize,
    		ECSigAlg:   util.SupportedECSignatureAlgorithms(*ec),
    		ECCCurve:   util.SupportedEllipticCurves(*curve),
    	})
    	if err != nil {
    		log.Fatalf("Failed to generate CSR: %s.", err)
    	}
    
    	saveCreds(csrPem, privPem)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  3. security/pkg/pki/util/crypto.go

    // is used then an error is returned
    func GetEllipticCurve(privKey *crypto.PrivateKey) (elliptic.Curve, error) {
    	switch key := (*privKey).(type) {
    	// this should agree with var SupportedECSignatureAlgorithms
    	case *ecdsa.PrivateKey:
    		if key.Curve == elliptic.P384() {
    			return key.Curve, nil
    		}
    		return elliptic.P256(), nil
    	default:
    		return nil, fmt.Errorf("private key is not ECDSA based")
    	}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. security/tools/generate_cert/main.go

    		Org:          *org,
    		IsCA:         *isCA,
    		IsSelfSigned: *mode == selfSignedMode,
    		IsClient:     *isClient,
    		RSAKeySize:   *keySize,
    		IsServer:     *isServer,
    		ECSigAlg:     util.SupportedECSignatureAlgorithms(*ec),
    		ECCCurve:     util.SupportedEllipticCurves(*curve),
    		DNSNames:     *sanFields,
    	}
    	certPem, privPem, err := util.GenCertKeyFromOptions(opts)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 28 16:21:30 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  5. security/pkg/pki/ra/k8s_ra_test.go

    			}
    		})
    	}
    }
    
    func createFakeCsr(t *testing.T) []byte {
    	options := pkiutil.CertOptions{
    		Host:       testCsrHostName,
    		RSAKeySize: 2048,
    		PKCS8Key:   false,
    		ECSigAlg:   pkiutil.SupportedECSignatureAlgorithms("ECDSA"),
    	}
    	csrPEM, _, err := pkiutil.GenCSR(options)
    	if err != nil {
    		t.Fatalf("Error creating Mock CA client: %v", err)
    		return nil
    	}
    	return csrPEM
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Sep 27 00:44:54 UTC 2023
    - 9.7K bytes
    - Viewed (0)
  6. security/pkg/k8s/chiron/utils_test.go

    			}
    		})
    	}
    }
    
    func createFakeCsr(t *testing.T) []byte {
    	options := pkiutil.CertOptions{
    		Host:       "fake.com",
    		RSAKeySize: 2048,
    		PKCS8Key:   false,
    		ECSigAlg:   pkiutil.SupportedECSignatureAlgorithms("ECDSA"),
    	}
    	csrPEM, _, err := pkiutil.GenCSR(options)
    	if err != nil {
    		t.Fatalf("Error creating Mock CA client: %v", err)
    		return nil
    	}
    	return csrPEM
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 03:58:11 UTC 2024
    - 13K bytes
    - Viewed (0)
  7. security/pkg/pki/ca/ca_test.go

    		t.Fatalf("Private key does not match, want %v got %v", KeyPem, serverSecret.Data[PrivateKeyFile])
    	}
    }
    
    func createCA(maxTTL time.Duration, ecSigAlg util.SupportedECSignatureAlgorithms) (*IstioCA, error) {
    	// Generate root CA key and cert.
    	rootCAOpts := util.CertOptions{
    		IsCA:         true,
    		IsSelfSigned: true,
    		TTL:          time.Hour,
    		Org:          "Root CA",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 08:51:27 UTC 2023
    - 29.1K bytes
    - Viewed (0)
  8. security/pkg/nodeagent/cache/secretcache.go

    	options := pkiutil.CertOptions{
    		Host:       csrHostName.String(),
    		RSAKeySize: sc.configOptions.WorkloadRSAKeySize,
    		PKCS8Key:   sc.configOptions.Pkcs8Keys,
    		ECSigAlg:   pkiutil.SupportedECSignatureAlgorithms(sc.configOptions.ECCSigAlg),
    		ECCCurve:   pkiutil.SupportedEllipticCurves(sc.configOptions.ECCCurve),
    	}
    
    	// Generate the cert/key, send CSR to CA.
    	csrPEM, keyPEM, err := pkiutil.GenCSR(options)
    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