From: Martin P. <Mar...@ia...> - 2007-10-11 12:30:47
|
francesca fabbri wrote: > I'm using your Tccert package to create a test certificate for a CA. Note that the CA functionality of TCcert was only intended to quickly create a "looks like a real CA" certificate for testing, not for production use. > I've a question: > is it possible to create a Ca certificate where the public and private > key of the Ca are created by me? IAIK-JCE is like a big toolbox you can use to create whatever type of certificate you like (at an amazing price, too, may I say ;-) > Another question: when i invoke the CaCertificate construct as follows: > cacert = new CACertificate(properties, null, null); > > and i invoke the method: > > cacert.getKeyPair().getPrivate() > or > caCert.getKeyPair().getPublic() > > do i obtain something? > Does the constructor create a keypair for the Ca? quoting the source of the constructor: String keysize = prop.getProperty("privatekeysize"); if (keysize!=null) { keypair_ = Common.generateRSAKeyPair(prop.getPropertyAsInt("privatekeysize")); } else { Log.info("privatekeysize not specified, using default 2048 bits"); keypair_ = Common.generateRSAKeyPair(2048); } HTH -- Martin Pirker IAIK, TU Graz |