[foaf-protocols] cert:key implementations
Henry Story
henry.story at gmail.com
Mon Oct 17 20:58:39 CEST 2011
Ok, I added an implementation to the read-write web scala project at the W3C.
https://dvcs.w3.org/hg/read-write-web/rev/8a84fe5eec71
As you can see the diff is pretty simple:
--- a/src/main/scala/auth/WebIdClaim.scala Mon Oct 17 12:52:37 2011 +0200
1.2 +++ b/src/main/scala/auth/WebIdClaim.scala Mon Oct 17 20:47:27 2011 +0200
1.3 @@ -42,17 +42,20 @@
1.4 final val xsd: String = "http://www.w3.org/2001/XMLSchema#"
1.5
1.6 val selectQuery = QueryFactory.create("""
1.7 - PREFIX cert: <http://www.w3.org/ns/auth/cert#>
1.8 - PREFIX rsa: <http://www.w3.org/ns/auth/rsa#>
1.9 - SELECT ?key ?m ?e ?mod ?exp
1.10 - WHERE {
1.11 - ?key cert:identity ?webid ;
1.12 - rsa:modulus ?m ;
1.13 - rsa:public_exponent ?e .
1.14 -
1.15 - OPTIONAL { ?m cert:hex ?mod . }
1.16 - OPTIONAL { ?e cert:decimal ?exp . }
1.17 - }""")
1.18 + PREFIX cert: <http://www.w3.org/ns/auth/cert#>
1.19 + PREFIX rsa: <http://www.w3.org/ns/auth/rsa#>
1.20 + SELECT ?m ?e ?mod ?exp
1.21 + WHERE {
1.22 + {
1.23 + ?key cert:identity ?webid .
1.24 + } UNION {
1.25 + ?webid cert:key ?key .
1.26 + }
1.27 + ?key rsa:modulus ?m ;
1.28 + rsa:public_exponent ?e .
1.29 + OPTIONAL { ?m cert:hex ?mod . }
1.30 + OPTIONAL { ?e cert:decimal ?exp . }
1.31 +}""")
1.32
I am not sure if this is better than Toby's implementation, but it may be. :-)
So now we just need bergi to update his tests so that we can find out if I am doing things right!
Henry
On 13 Oct 2011, at 14:37, Toby Inkster wrote:
> Henry Story <henry.story at gmail.com> wrote:
>> On 13 Oct 2011, at 14:06, Toby Inkster wrote:
>>
>>> Checked in support for cert:pubKey to my repo...
>>> http://goddamn.co.uk/svn-web/perlmods/revision?rev=977
>>
>> Goddamn that's fast!
>>
>> Ok. Can we then go for just cert:key ?
>
> http://goddamn.co.uk/svn-web/perlmods/revision?rev=978
>
> Would have been faster but I was eating some clementine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.foaf-project.org/pipermail/foaf-protocols/attachments/20111017/b0ce6a64/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4616 bytes
Desc: not available
Url : http://lists.foaf-project.org/pipermail/foaf-protocols/attachments/20111017/b0ce6a64/attachment-0001.bin
More information about the foaf-protocols
mailing list