|
From: Saurabh A. <tan...@gm...> - 2007-06-18 08:37:15
|
I wish this group was more active in co-operation.
On 6/15/07, Saurabh Arora <tan...@gm...> wrote:
> Hi
>
> On 6/14/07, Thomas Winkler <tc...@to...> wrote:
> > Hi,
> >
> > > > > how can i convert a 160 bit string nonce to TcBlobData type in
> > > > > jTSSWrapper library ?
> >
> > The nonce you have is a Java String?
> >
> > In case you are using jTSS Wrapper < 0.3 use the following code:
> >
> > TcBlobData blob =
> > TcTssStructFactory.newBlobData().initStringASCII("yourNonce");
> >
> > In case you are using jTSS Wrapper 0.3 use the following code:
> >
> > TcBlobData blob = TcBlobData.newStringASCII("yourNonce");
> >
>
> it worked.. but now i get another error :
> "nonce in quote does not match expected nonce"
>
> I want to do a quote operation using my "nonce".
> the sample (working) quote code uses :
> -------
>
> TcBlobData nonce = context_.getTpm().getRandom(
> TcTcpaDefines.TCPA_SHA1BASED_NONCE_LEN);
> -------
>
> now when i use :
> ---------
> TcBlobData nonce =
> TcTssStructFactory.newBlobData().initString*("516ebb86fe1dc24c6099d212ff971b61b0f5137a");
> ---------
>
> it gives me the error while verifying the quoteblob(in the code) :
> --------
>
> TcTcpaQuoteInfo quoteInfo = new TcTcpaQuoteInfo(quoteBlob.getData());
> if (!quoteInfo.getExternalData().getEncoded().equals(expectedNonce)) {
> throw new TcException(
> "nonce in quote does not match expected nonce");
> }
>
> --------
>
>
> ne pointers what is going wrong here ?
>
> regards
> Saurabh
>
|