[foaf-protocols] FOAF+SSL: Code Fragments in PHP Used for Simple Authentication

Melvin Carvalho melvincarvalho at gmail.com
Tue Dec 16 14:13:36 CET 2008


Hi All

The following are some documented code fragments in PHP, that are used to
create a simple authentication system, using FOAF + SSL

1. Code fragments for SSL related functions:
- Displaying the output of the $_SERVER global variable
- Displaying the details in the supplied Client Certificate
- Displaying the Client Public Key info
- Function returning the Client Public Key info in HEX
- Function returning the subjectAltName in the Client Certificate
https://foaf.me/testSSL.php

Note: Since we were unable to find an ASN.1 parser in PHP, an attempt was
made to do this via the shell using openssl, as a stop gap.

2. Code fragments for FOAF related functions:
- Converting a FOAF file into an array of triples
- Finding the RSA Key of the declared subject ("owner") within a FOAF file
- Getting the list of friends in a FOAF file
https://foaf.me/testFOAF.php

Note: ARC2 [1] was used to obtain triples from the remote file, which were
iterated through.  Though, it would be possible to run more complex SPARQL
queries, as desired.

-Melvin

[1] http://arc.semsol.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.foaf-project.org/pipermail/foaf-protocols/attachments/20081216/e38bdb15/attachment.htm 


More information about the foaf-protocols mailing list