Re: [Jsdsi-users] KeyPairs generated by other APIs ==> Exception
Status: Pre-Alpha
Brought to you by:
sajma
From: Somaya A. <som...@ya...> - 2006-01-14 20:33:26
|
Okay, attached plz find a file; it is a small program for an agent trying to create a certificate for another agent. Plz tell me if you have any comments Thanks alot, Somaya Sameer Ajmani <aj...@gm...> wrote: I don't want to run the code -- just visually inspect it. S On 1/13/06, Somaya Aboulwafa 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 wrote: > > > On 1/5/06, Somaya Aboulwafa > > 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 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 > > > > > > > > > > > > > > > > > > > > Êç Ãâ¦Ãâ Ã¥ðç ïùÃËÃâ çÃâ¡ ÃËìïÃâ çÃâ¡ > > ÃâñÊè .. Ãâ óãÃâÃÆ Êç çÃâÃâÃ⡠Êç Ãâ¦Ãâçð > > ÃÆÃâ úñÊè .. ãÃâ êñòÃâÃâ ç çÃâíÊçÃâ¡ > > ùÃâÃâ° Ã(r)÷ÃⰠçÃâíèÊè > > > > > > > > > > > > > > > > > > __________________________________________ > > > 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 > > > > > > > > > > > > -- > > Sameer > > http://ajmani.net > > N¬HYõ隊X¬²š'²ŠÃu¼'¦[§Ââ°ÃŨº > > æÃk¢è!âËÅ W¬~Šé(r)â Ã¥zk¶ŠC£ > > > å¡§mâ¦Ã©ÃÃ@^Ú­Ã^ž§zÃZ¶f¤zÃj·!Å x2¢êå¢ââ¢Ã«Â±Ã¦Â¬Ã«,º·âž a{⺠åÂ,à HòÃ4¨m¶ŸÿiÃ(±ÃâoÃv'ï­ûjYhr'ï:æŠrXÅÂâºÂ²+¬z»&j)bž > b²ÃlvÃ(r)±êìâ+-²Ã.­ÃŸ¢¸Âëa¶Ãlÿùb²Ã,¢êÃyú+Âé÷ùb²Ã?â+-Å wèþ;²+¬z» > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- Sameer http://ajmani.net --------------------------------- Yahoo! Photos Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever. |