Changeset 6
- Timestamp:
- 06/26/06 23:27:53 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tpm4java/trunk/src/de/datenzone/tpm4java/TCPAIdentityProof.java
r1 r6 30 30 import java.security.spec.InvalidKeySpecException; 31 31 32 /** 33 * TCPAIdentityProof is the structure that is sent to a privacy CA (encrypted in 34 * an Identity Request) 35 * 36 * @author Martin Hermanowski 37 * 38 */ 32 39 public class TCPAIdentityProof implements Serializable { 33 40 private static final long serialVersionUID = -8802683964528865550L; … … 47 54 private byte[] identityBinding; 48 55 56 /** 57 * @return the identityBinding signature 58 */ 49 59 public byte[] getIdentityBinding() { 50 60 return identityBinding; 51 61 } 52 62 63 /** 64 * set the identityBinding signature 65 * 66 * @param identityBinding 67 */ 53 68 public void setIdentityBinding(byte[] identityBinding) { 54 69 this.identityBinding = identityBinding; … … 56 71 57 72 /** 73 * create a TCPAIdentityProof with the given parameters 74 * 58 75 * @param version 59 76 * @param identityKey 77 * the key for which this should be the proof 60 78 * @param labelArea 79 * the CA's label 61 80 * @param endorsementCredential 81 * should be a certificate... may not be <b>null</b>, but 82 * byte[0] for SimplePrivacyCA 62 83 * @param platformCredential 84 * same as above 63 85 * @param conformanceCredential 86 * same as above 87 * @param identityBinding 88 * the identityBinding signature 64 89 */ 65 90 public TCPAIdentityProof(int version, TPMPubKeyWrapper identityKey, … … 77 102 } 78 103 104 /** 105 * verify the identityBinding structure. This might be needed to check for 106 * the wrong version in the TPM-Quote command. 107 * 108 * @param chosenId 109 * @return 110 * @throws SignatureException 111 * @throws InvalidKeyException 112 * @throws InvalidKeySpecException 113 * @throws NoSuchAlgorithmException 114 */ 79 115 boolean verify(byte[] chosenId) throws SignatureException, 80 116 InvalidKeyException, InvalidKeySpecException, … … 145 181 } 146 182 183 /** 184 * assemble a raw IdentityProof structure 185 * 186 * @return the raw blob 187 */ 147 188 public byte[] getRaw() { 148 189 byte[] pubKey = getIdentityKey().getRaw(); … … 168 209 } 169 210 211 /** 212 * parse a raw IdentityProof structure 213 * 214 * @param raw 215 */ 170 216 public TCPAIdentityProof(byte[] raw) { 171 217 ByteBuffer b = ByteBuffer.wrap(raw);
