File: certificate-generation.pl

package info (click to toggle)
libweb-id-perl 1.927-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 288 kB
  • sloc: perl: 1,381; makefile: 2; sh: 1
file content (17 lines) | stat: -rw-r--r-- 494 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use Web::ID::Certificate::Generator;

Web::ID::Certificate->generate(
	passphrase        => 'test1234',
	subject_alt_names => [
		Web::ID::SAN::URI->new(value => 'http://example.com/id/alice'),
		Web::ID::SAN::URI->new(value => 'http://example.net/id/alice'),
		],
	cert_output       => \(my $output),
	rdf_output        => \(my $model),
	subject_cn        => 'Alice Test',
	subject_country   => 'gb',
	);
	
print RDF::Trine::Serializer
	-> new('RDFXML')
	-> serialize_model_to_string($model);