NAME
RDF::Crypt::Verifier - verifies signed RDF graphs
DESCRIPTION
A Verifier object is created using an RSA public key. The object can be used to verify signatures for multiple RDF graphs.
Constructors
new_from_file($file)
-
Given a filename containing a DER or PEM encoded RSA public key, constructs a Verifier object.
new_from_string($str)
-
Given a string containing a DER or PEM encoded RSA public key, constructs a Verifier object.
new_from_pubkey($key)
-
Given a Crypt::OpenSSL::RSA public key object, constructs a Verifier object.
new_from_webid($uri)
-
Given a WebID with one of more FOAF+SSL public keys, constructs a Verifier object.
Class Methods
verify_manifest($manifest)
-
Given a manifest created by the Signer, attempts to verify each signature in it. Returns a list of hashrefs such that each hashref has the following keys:
document - the URI of the thing that was signed
signer - the WebID of the agent that signed it
signedAt - signature datetime
signature - base64 RSA signature
verification - true/false/undef (see
verify_model
)
Object Methods
verify_model($model, $signature)
-
Returns true if verification was successful; false but defined if verification failed; undefined if verification was not attempted for some reason.
verify_embedded_turtle($turtle, $baseuri)
-
Counterpart to Signer's
sign_embed_turtle
. verify_embedded_rdfxml($xml, $baseuri)
-
Counterpart to Signer's
sign_embed_rdfxml
. verify_embedded_rdfa($html, $baseuri, \%config)
-
Counterpart to Signer's
sign_embed_rdfa
. verify_text($str, $signature)
-
Bonus method - verifies a literal string which may or may not have anything to do with RDF.
SEE ALSO
BUGS
Please report any bugs to http://rt.cpan.org/.
AUTHOR
Toby Inkster <tobyink@cpan.org>.
COPYRIGHT
Copyright 2010 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.