Re: [Jsdsi-users] KeyPairs generated by other APIs ==> Exception
Status: Pre-Alpha
Brought to you by:
sajma
From: Somaya A. <som...@ya...> - 2006-01-13 21:15:50
|
Hi Sameer, I dont think that Im using wrong classes. I am using keyPairs that are objects of java.security.KeyPair class. And Im using getPublic() method to get the public key object. Am i doing anything wrong? Thanks for your help Somaya --- Somaya Aboulwafa <som...@ya...> wrote: > Hi Sameer, > > Yes i can, but, for you to run it you'll need to > install the Agents framework that i'm using (JADE > multiagent framework). This is becoz, I'm using > keypairs generated by this API. Do u have time to do > this?! > > Thanks, > Somaya > > --- Sameer Ajmani <aj...@gm...> wrote: > > > On 1/5/06, Somaya Aboulwafa > <som...@ya...> > > wrote: > > > Hello, > > > > > > The exception happens when trying to create an > > > authorization certificate using this line of > code: > > > > > > AuthCert cert = new AuthCert((Principal) > > > signer.getPublic(), (Subject)signee. > getPublic(),, > > v, > > > dh, c, t, p); > > > > > > Where signer and signee parameters are > > > java.security.KeyPair objects generated from > > outside > > > the JSDSI API. > > > > > > The Exception is as follows: > > > java.lang.ClassCastException: > > > sun.security.rsa.RSAPublicKeyImpl > > > at > > > > > > credentials.version1_0.SenderAgent.CreateCertificate(SenderAgent.java:123) > > > at > > > > > > credentials.version1_0.SenderAgent.access$2(SenderAgent.java:111) > > > > > > > > > Another exception also occurs when trying to > sign > > a > > > certificate using the following line of code: > > > > > > jsdsi.Signature sig = > > jsdsi.Signature.create(signer, > > > cert, DigestAlgoEnum.SHA1); > > > > > > It is as follows: > > > java.lang.ClassCastException: > > > sun.security.rsa.RSAPublicKeyImpl > > > at > > jsdsi.Signature.create(Signature.java:199) > > > at > > jsdsi.Signature.create(Signature.java:157) > > > at > > jsdsi.Signature.create(Signature.java:109) > > > > Looks like the key you're passing to Signature are > > of the wrong class. > > Can you create a small program that throws this > > exception? e.g., > > create a key pair, then create a signature? > > > > S > > > > > > > > Many Thanks, > > > Somaya > > > > > > > > > > > > --- LuÙs Pedro <lp...@ne...> wrote: > > > > > > > Hello Somaya Aboulwafa, > > > > > > > > Could you send the Exception? > > > > > > > > » -----Original Message----- > > > > » From: > jsd...@li... > > > > » > > [mailto:jsd...@li...] > > > > On Behalf Of > > > > » Somaya Aboulwafa > > > > » Sent: quinta-feira, 5 de Janeiro de 2006 > 7:32 > > > > » To: jsd...@li... > > > > » Cc: aj...@gm... > > > > » Subject: [Jsdsi-users] KeyPairs generated > by > > other > > > > APIs ==> Exception > > > > » > > > > » Hi Sameer and everyone, > > > > » > > > > » I'm using JSDSI with another framework (a > > > > Multiagent system > > > > » framework). > > > > » Agents in this framework have their own > > KeyPairs. > > > > » Whenever I try to use those KeyPairs to > > create or > > > > sign > > > > » certificates using JSDSI I got an > exception. > > While > > > > if I used > > > > » JSDSI with KeyPairs generated by JSDSI I > got > > no > > > > exceptions > > > > » > > > > » So, would you plz help me to figure out the > > > > problem? > > > > » > > > > » Thanks in advance, > > > > » Somaya > > > > » > > > > » > > > > » > > > > » > > > > » __________________________________________ > > > > » Yahoo! DSL â Something to write home > about. > > > > » Just $16.99/mo. or less. > > > > » dsl.yahoo.com > > > > » > > > > » > > > > » > > > > » > > > > > > > > > > ------------------------------------------------------- > > > > » This SF.net email is sponsored by: Splunk > > Inc. Do > > > > you grep > > > > » through log files > > > > » for problems? Stop! Download the new AJAX > > search > > > > engine that makes > > > > » searching your log files as easy as surfing > > the > > > > web. > > > > » DOWNLOAD SPLUNK! > > > > » > > > > > > > > > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click > > > > » > > _______________________________________________ > > > > » Jsdsi-users mailing list > > > > » Jsd...@li... > > > > » > > > > > > > > > > https://lists.sourceforge.net/lists/listinfo/jsdsi-users > > > > > > > > > > > > > > > > > > > > ÙØ§ ٠٠إذا دعÙÙØ§Ù ÙØ¬Ø¯Ùا٠> > ÙØ±Ùب .. ÙØ³Ø£ÙÙ ÙØ§ اÙÙÙ ÙØ§ Ù ÙØ§Ø° > > ÙÙ ØºØ±ÙØ¨ .. أ٠ترزÙÙØ§ Ø§ÙØÙØ§Ù > > عÙÙ Ø®Ø·Ù Ø§ÙØØ¨ÙØ¨ > > > > > > > > > > > > > > > > > > __________________________________________ > > > Yahoo! DSL â Something to write home about. > > > Just $16.99/mo. or less. > > > dsl.yahoo.com > > > > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: Splunk Inc. > Do > > you grep through log files > > > for problems? Stop! Download the new AJAX > search > > engine that makes > > > searching your log files as easy as surfing the > > web. DOWNLOAD SPLUNK! > > > > > > === message truncated === íÇ ãä ÅÐÇ ÏÚæäÇå æÌÏäÇå ÞÑíÈ .. äÓÃáß íÇ Çááå íÇ ãáÇÐ ßá ÛÑíÈ .. Ãä ÊÑÒÞäÇ ÇáÍíÇå Úáì ÎØì ÇáÍÈíÈ __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |