|
From: Christoph E. <jt...@eu...> - 2008-08-08 08:44:29
|
Hy,
is there a way to get the certificates issued by the TPM into some
format that can be read be applications which don't rely on the TSS? So
export a TcTssValidation to something like X.509 or.... ?
And is there a "nicer" way to convert the public part of a TcIRsaKey
into a "Java" Public-Key than this:
TcBlobData b = key.getAttribData(
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO,
TcTssConstants.TSS_TSPATTRIB_KEYINFO_RSA_EXPONENT);
BigInteger EXPONENT = new BigInteger(b.asByteArray());
b = key.getAttribData(
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO,
TcTssConstants.TSS_TSPATTRIB_KEYINFO_RSA_MODULUS);
BigInteger MODULUS = new BigInteger(b.asByteArray());
RSAPublicKeySpec pubSpec = new RSAPublicKeySpec(MODULUS,EXPONENT);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PublicKey pub = keyFactory.generatePublic(pubSpec);
|