[foaf-protocols] generating certificates and trying out foaf+ssl
Story Henry
henry.story at bblfish.net
Thu Oct 9 22:41:16 CEST 2008
I have placed a little program to generate and produce the foaf that
needs to be added to one's foaf file in sommer.dev.java.net . It is in
the misc/FoafServer directory
Run it like this:
$ ant jar #make sure your JAVA_HOME is set to java 6
$ java -cp dist/FoafServer.jar
net.java.dev.sommer.foafserver.utils.GenerateKey -uri http://bblfish.net/people/henry/card#me
-pass hell0
publish this triples that go with this N3 (use cwm to merge it into an
rdf file)
# the ontology is very speculative here.
# we only need a way of linking a person to his x509 certificate, of
which all that is required is the signature
@prefix wot: <http://xmlns.com/wot/0.1/> .
<http://bblfish.net/people/henry/card#me>
is wot:identity of [
a wot:x509Certificate;
wot:sigType wot:md5WithRSAEncryption;
wot:sigValue
"4d85aae9e4c4afc0384fc10b56a9cd61125e804717c0bbe324a7c85d2c9da14696a0c9eb7714e3d375a2ff0edf363c484c5dfcd779985de8ed9f29c6926f827778553bc2984276fea9c69d051ef6c7579fc610fee67feebd112c800664dc86bbc9f1794ae0d0b79f6f502fcda5c4bd24026312f1faabbc2aaae2ec35c2f5244c"
] .
the public and private keys are in the stored in cert.pkcs
you can list the contents by running the command
$ openssl pkcs12 -clcerts -nokeys -in cert.pkcs | openssl x509 -noout -
text
The foaf there can be added to your foaf file, and then you can query
Juliette's protected foaf
$ java -cp dist/FoafServer.jar -Djavax.net.ssl.keyStore=cert.pkcs -
Djavax.net.ssl.keyStorePassword=hell0 -
Djavax.net.ssl.keyStoreType=PKCS12
net.java.dev.sommer.foafserver.utils.TestGet https://www.pipian.com/rdf/tami/juliette-protected-location
You will get N3 back, only if your foaf file returns the correct
signature.
Ok. So clearly the rdf in the foaf file is not yet properly defined.
Should one put the signature value, or something else? This should be
defined. Perhaps worth playing with first to get an idea of what is
happening. Then we could work out which ontology to use, or which
relations need to be created.
Henry
Home page: http://bblfish.net/
More information about the foaf-protocols
mailing list