[Jsdsi-devel] New Mavenised JSDSI
Status: Pre-Alpha
Brought to you by:
sajma
|
From: Sean R. <sra...@ae...> - 2004-02-28 16:23:35
|
All, I have uploaded to CVS the new Mavenised version of JSDSI. To use it: 1. Install Maven on your machine: a. download Maven from http://maven.apache.org/start/download.html b. install it as per http://maven.apache.org/start/install.html 2. Checkout the latest CVS from the jsdsi tree 3. From the shell in your jsdsi directory try a 'maven jar'. This should compile all of the classes and run all the tests, resulting in a 'jsdsi-0.5.jar' in the 'target' directory. You may get a compilation problem with finding the cryptix classes. If so copy the cryptix32.jar into your local maven repository (should be ~/.maven/repository/cryptix/jars/) If you want an eclipse project to develop jsdsi in just run the maven eclipse plugin: http://maven.apache.org/reference/plugins/eclipse/ (basically means run 'maven eclipse' from the shell. Any problems, just shout. Sean (I'll update the web-site with the new Maven produced site shortly) On Thu, 2004-02-26 at 14:59, Sameer Ajmani wrote: > Well, my hope was to avoid requiring any semantic information in the > JSDSI-to-XML translation. The output I showed you earlier simply converts > jsdsi.Objs to Sexps, then converts these Sexps to XML. Thus, all the > semantics is captures in the JSDSI-to-Sexp translation. > > Using "local-name" as you have below requires the XML tranlation to know > the meaning of a particular string. I would instead suggest that the Sexp > format be changed to: > (name (public-key ...) (local-name alice) (local-name bob)) > > Then, everything will work perfectly :) > Sameer > > > akin to 'the spec' I would vote for something like the later: > > (name (public-key ...) alice bob) > > becomes > > <name> > > <public-key>...</public-key> > > <local-name>alice</local-name> > > <local-name>bob</local-name> > > </name> > > > > with maybe an (optional) index attribute on the local-name: > > <name> > > <public-key>...</public-key> > > <local-name index="0">alice</local-name> > > <local-name index="1">bob</local-name> > > </name> > > > > > > Sean > > > > On Thu, 2004-02-26 at 13:05, Sameer Ajmani wrote: > >> > Hmm... Those possible changes to the SExp just seem to make them > >> more verbose just for XML... > >> Right. The alternative is to wrap each base SexpString in its own > >> element: CarolJones > >> becomes > >> <string val="CarolJones"/> > >> or <string>CarolJones</string> > >> > >> > Have you seen this: > >> I glanced at these specs some time age. We should aim to support this > >> spec whatever the SPKI working group (or Carl Ellison) uses. > >> > >> > http://bladesys.demon.co.uk/roller/resources/sradford/draft-orri-spki-xml-cert-struc-00.txt > >> > >> Thanks, > >> Sameer > >> > >> > > >> > Sean > >> > > >> > On Wed, 2004-02-25 at 18:41, Sameer Ajmani wrote: > >> >> > (at first I wondering if the placing of the 'local name' of > >> >> CarolJones was correct, but I think it is the right thing to do - > >> not many xml documents have a tag and a text value as direct > >> >> children of another tag). > >> >> > >> >> Yes, the string interspersed with elements are ugly (and maybe a > >> problem). > >> >> I'll try to write an XmlReader that inverts this process sometime > >> >> soon, > >> >> and hopefully that will complain if this is invalid XML :) It also > >> may be problematic if XML concatenates adjacent strings, e.g., > >> (name (public-key ...) mary friends) will become: > >> >> <name> > >> >> <public-key>...</public-key> > >> >> mary friends > >> >> </name> > >> >> > >> >> XML will read "mary friends" as a single block of character data, > >> while SPKI treasts it as two SexpStrings. My XmlReader will handle > >> this just fine, but the XML form lacks some structural information. > >> >> > >> >> An alternative is to make SPKI's syntax more XML-compatible by > >> restricting its S-expressions to SexpLists thatcontain one > >> SexpString or an arbitrary number of SexpLists. So the above name > >> object would be: > >> >> (name (public-key ...) (id mary) (id friends)) > >> >> > >> >> While this is ugly in the "name" case, it actually makes some other > >> structures clearer: > >> >> > >> >> (hash md5 |hfslk782yf2|) > >> >> becomes: > >> >> (hash (algo md5) (value |hfslk782yf2|)) > >> >> > >> >> (k-of-n "2" "3" > >> >> (public-key ...) (public-key ...) (public-key ...)) > >> >> becomes: > >> >> (k-of-n (k "2") (n "3") > >> >> (public-key ...) (public-key ...) (public-key ...)) > >> >> > >> >> This change would require consulting with the SPKI designers (I > >> could contact Carl Ellison about this). > >> >> > >> >> Sameer > >> >> > >> >> > On Wed, 2004-02-25 at 02:54, Sameer Ajmani wrote: > >> >> >> I have just committed a simple Sexp-to-XML converter to JSDSI. > >> >> This makes it possible to express JSDSI objects as XML (by first > >> converting them to S-expressions). I added the package jsdsi.xml > >> and the class jsdsi.xml.XmlWriter, and extended the jsdsi.S2X > >> utility to support xml output. Here's an example: > >> >> >> > >> >> >> Input S-expression: > >> >> >> > >> >> >> (cert > >> >> >> (issuer > >> >> >> (name > >> >> >> (public-key > >> >> >> (rsa-pkcs1-md5 > >> >> >> (e #010001#) > >> >> >> (n > >> >> >> |AKd6zpHoNSq53rFFZ6XZV5m+YZKr1Ym9fUMuE8yHMOZx9AsrWqkZyMxZ9Cn > >> >> >> 5mIPaTLqYEakoJ7lir25a/Nq1IpvFC8mlalpI2LINDRnIt3HbmiFEj97Eaqk > >> 2ffhwXotFHIbPGyrgrMobOtWIpG56Ru5AK230lG68+ZyntCqB53v5|))) > >> >> >> CarolJones)) > >> >> >> (subject > >> >> >> (public-key > >> >> >> (rsa-pkcs1-md5 > >> >> >> (e #010001#) > >> >> >> (n > >> >> >> |AK0aiccf7Yj/Gzx93m6R6suJiPr5o9ZON6dG31wwDyGK2aKoMJUYLxVMWGh5R > >> >> >> 2Wsc+RO+ylvablNhmO7zGiZ9qNiN+vdTjdxMALx4ULFF1aYNi86QsSgU/x8Xrk > >> >> 2SiHQ9EkHGDJ7Bpng+4LNSjQtm2DuEscHP3mqz8BzGB+jTek/|))))) > >> >> >> > >> >> >> Output XML: > >> >> >> > >> >> >> <cert> > >> >> >> <issuer> > >> >> >> <name> > >> >> >> <public-key> > >> >> >> <rsa-pkcs1-md5> > >> >> >> <e> > >> >> >> #010001# > >> >> >> </e> > >> >> >> <n> > >> >> >> |AKd6zpHoNSq53rFFZ6XZV5m+YZKr1Ym9fUMuE8yHMOZx9AsrWqkZyMxZ9Cn5 > >> >> >> mIPaTLqYEakoJ7lir25a/Nq1IpvFC8mlalpI2LINDRnIt3HbmiFEj97Eaqk2 > >> ffhwXotFHIbPGyrgrMobOtWIpG56Ru5AK230lG68+ZyntCqB53v5| > >> >> >> </n> > >> >> >> </rsa-pkcs1-md5> > >> >> >> </public-key> > >> >> >> CarolJones > >> >> >> </name> > >> >> >> </issuer> > >> >> >> <subject> > >> >> >> <public-key> > >> >> >> <rsa-pkcs1-md5> > >> >> >> <e> > >> >> >> #010001# > >> >> >> </e> > >> >> >> <n> > >> >> >> |AK0aiccf7Yj/Gzx93m6R6suJiPr5o9ZON6dG31wwDyGK2aKoMJUYLxVMWGh5R2 > >> >> >> Wsc+RO+ylvablNhmO7zGiZ9qNiN+vdTjdxMALx4ULFF1aYNi86QsSgU/x8Xrk2 > >> >> SiHQ9EkHGDJ7Bpng+4LNSjQtm2DuEscHP3mqz8BzGB+jTek/| > >> >> >> </n> > >> >> >> </rsa-pkcs1-md5> > >> >> >> </public-key> > >> >> >> </subject> > >> >> >> </cert> > >> >> >> > >> >> >> The problems with this are that it's not terribly compact (e.g., > >> >> the "e" elements could be all on one line), I'm not sure whether > >> all the characters used in the text blocks are allowed, there's no > >> schema or DTD, and there's no XmlReader (yet). But does this > >> conversion look reasonable? > >> >> >> > >> >> >> Sameer > >> >> >> > >> >> >> http://ajmani.net > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> ------------------------------------------------------- > >> >> >> SF.Net is sponsored by: Speed Start Your Linux Apps Now. > >> >> >> Build and deploy apps & Web services for Linux with > >> >> >> a free DVD software kit from IBM. Click Now! > >> >> >> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > >> >> >> _______________________________________________ > >> >> >> Jsdsi-devel mailing list > >> >> >> Jsd...@li... > >> >> >> https://lists.sourceforge.net/lists/listinfo/jsdsi-devel > >> >> > -- > >> >> > Dr. Sean Radford, MBBS, MSc > >> >> > sra...@ae... > >> >> > http://www.aegeus-technology.com > >> >> > >> >> > >> >> http://ajmani.net > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> ------------------------------------------------------- > >> >> SF.Net is sponsored by: Speed Start Your Linux Apps Now. > >> >> Build and deploy apps & Web services for Linux with > >> >> a free DVD software kit from IBM. Click Now! > >> >> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click > >> >> _______________________________________________ > >> >> Jsdsi-devel mailing list > >> >> Jsd...@li... > >> >> https://lists.sourceforge.net/lists/listinfo/jsdsi-devel > >> > -- > >> > Dr. Sean Radford, MBBS, MSc > >> > sra...@ae... > >> > http://www.aegeus-technology.com > >> > >> > >> http://ajmani.net > >> > > -- > > Dr. Sean Radford, MBBS, MSc > > sra...@ae... > > http://www.aegeus-technology.com > > > http://ajmani.net > -- Dr. Sean Radford, MBBS, MSc sra...@ae... http://www.aegeus-technology.com |