Home
last modified time | relevance | path

Searched refs:certGen (Results 1 – 2 of 2) sorted by relevance

/frameworks/base/tests/net/java/android/net/
DIkev2VpnProfileTest.java425 final X509V1CertificateGenerator certGen = new X509V1CertificateGenerator(); in generateRandomCertAndKeyPair() local
426 certGen.setSerialNumber(BigInteger.valueOf(System.currentTimeMillis())); in generateRandomCertAndKeyPair()
427 certGen.setSubjectDN(dnName); in generateRandomCertAndKeyPair()
428 certGen.setIssuerDN(dnName); in generateRandomCertAndKeyPair()
429 certGen.setNotBefore(validityBeginDate); in generateRandomCertAndKeyPair()
430 certGen.setNotAfter(validityEndDate); in generateRandomCertAndKeyPair()
431 certGen.setPublicKey(keyPair.getPublic()); in generateRandomCertAndKeyPair()
432 certGen.setSignatureAlgorithm("SHA256WithRSAEncryption"); in generateRandomCertAndKeyPair()
434 final X509Certificate cert = certGen.generate(keyPair.getPrivate(), "AndroidOpenSSL"); in generateRandomCertAndKeyPair()
/frameworks/base/keystore/java/android/security/keystore/
DAndroidKeyStoreKeyPairGeneratorSpi.java678 final X509V3CertificateGenerator certGen = new X509V3CertificateGenerator(); in generateSelfSignedCertificateWithValidSignature() local
679 certGen.setPublicKey(publicKey); in generateSelfSignedCertificateWithValidSignature()
680 certGen.setSerialNumber(mSpec.getCertificateSerialNumber()); in generateSelfSignedCertificateWithValidSignature()
681 certGen.setSubjectDN(mSpec.getCertificateSubject()); in generateSelfSignedCertificateWithValidSignature()
682 certGen.setIssuerDN(mSpec.getCertificateSubject()); in generateSelfSignedCertificateWithValidSignature()
683 certGen.setNotBefore(mSpec.getCertificateNotBefore()); in generateSelfSignedCertificateWithValidSignature()
684 certGen.setNotAfter(mSpec.getCertificateNotAfter()); in generateSelfSignedCertificateWithValidSignature()
685 certGen.setSignatureAlgorithm(signatureAlgorithm); in generateSelfSignedCertificateWithValidSignature()
686 return certGen.generate(privateKey); in generateSelfSignedCertificateWithValidSignature()