-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PKCS10Test based off of netscape.security
Signed-off-by: Alexander Scheel <[email protected]>
- Loading branch information
Showing
5 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package org.mozilla.jss.tests; | ||
|
||
import java.security.PublicKey; | ||
import java.security.KeyPair; | ||
import java.security.interfaces.*; | ||
|
||
import org.mozilla.jss.*; | ||
import org.mozilla.jss.crypto.*; | ||
import org.mozilla.jss.netscape.security.pkcs.*; | ||
import org.mozilla.jss.netscape.security.x509.*; | ||
|
||
public class PKCS10Test { | ||
public static void main(String[] args) throws Exception { | ||
CryptoManager cm = CryptoManager.getInstance(); | ||
|
||
CertAndKeyGen ckg = new CertAndKeyGen("RSA", "SHA256withRSA"); | ||
ckg.generate(4096); | ||
PKCS10 csr = ckg.getCertRequest(new X500Name("CN=localhost")); | ||
} | ||
} |