Commits

Toby Inkster committed 8132f20

Add parser for HTTP "Link" headers.

Comments (0)

Files changed (4)

-e50300657b8417f589403d4bce9a3a7d test.rdf
+ca77c54fb3576a2be3cb4418c15843c1 test.rdf
 
 	<Document rdf:about="">
 		<wot:assurance rdf:resource="test.rdf.asc" />
+		<wot:assurance rdf:resource="test.rdf.asc.2" />
 		<wot:assurance rdf:resource="MD5SUMS" />
 	</Document>
 

testing/test.rdf.asc

 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.8 (Darwin)
+Version: GnuPG v1.4.9 (GNU/Linux)
 
-iEYEARECAAYFAkn1UTwACgkQzr+BKGoqfTlqBwCfckf9mvNWTakEezE2VrkFRR0f
-rFMAnAwDD01UVsz18pQ6eyevicJsjECD
-=RZU7
+iEYEABECAAYFAkn1ogsACgkQzr+BKGoqfTnTBQCffWZVol6f2ptI5JsrbQuZ/oQ4
+3usAn2UivTHbOv4UHlAqkeff9HCnRWvt
+=4Sa7
 -----END PGP SIGNATURE-----
 #!/usr/bin/perl
 
-# Example - the GPG signature should fail, but the MD5SUM passes.
 use Data::Dumper;
-my $rdf = 'file:///Users/tai/trust/test.rdf';
+$ENV{'GPG_PATH'} = '/usr/bin/gpg';
+my $rdf = 'file:///home/tai/src/perlmods/RDF-WOT-Validation/testing/test.rdf';
 my $v   = RDF::WOT::Verification->new($rdf);
 print Dumper($v);
 
 	print TMPSIG $sig;
 	close TMPSIG;
 
+	my $gpg_path = $ENV{'GPG_PATH'};
+	$gpg_path = '/usr/local/bin/gpg' unless $gpg_path;
+
 	my ($wtr, $rdr, $err);
 	my $pid = open3($wtr, $rdr, $err,
-		'/usr/local/bin/gpg', '--verify',
+		$gpg_path, '--verify',
 		'--no-tty', '--status-fd', '2', '--command-fd',  0,
 		$fsig, $fdata);
 	my $gpg = {};
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.