XML-Compile-WSS-Signature
view release on metacpan or search on metacpan
lib/XML/Compile/WSS/Sign/RSA.pod view on Meta::CPAN
=encoding utf8
=head1 NAME
XML::Compile::WSS::Sign::RSA - WSS Signing with RSA
=head1 INHERITANCE
XML::Compile::WSS::Sign::RSA
is a XML::Compile::WSS::Sign
=head1 SYNOPSIS
# either
use XML::Compile::WSS::Util qw/DSIG_RSA_SHA1/;
my $sign = XML::Compile::WSS::Sign->new(type => DSIG_RSA_SHA1);
# or
use XML::Compile::WSS::Sign::RSA;
my $token = XML::Compile::WSS::Sign::RSA->new(
hashing => 'SHA1', ...);
=head1 DESCRIPTION
Extends L<"DESCRIPTION" in XML::Compile::WSS::Sign|XML::Compile::WSS::Sign/"DESCRIPTION">.
=head1 METHODS
Extends L<"METHODS" in XML::Compile::WSS::Sign|XML::Compile::WSS::Sign/"METHODS">.
=head2 Constructors
Extends L<"Constructors" in XML::Compile::WSS::Sign|XML::Compile::WSS::Sign/"Constructors">.
=over 4
=item XML::Compile::WSS::Sign::RSA-E<gt>B<fromConfig>(HASH|PAIRS)
Inherited, see L<XML::Compile::WSS::Sign/"Constructors">
=item XML::Compile::WSS::Sign::RSA-E<gt>B<new>(%options)
-Option --Defined in --Default
hashing <undef>
padding <undef>
private_key undef
public_key <from private key>
sign_method XML::Compile::WSS::Sign DSIG_RSA_SHA1
=over 2
=item hashing => 'SHA1'|'MD5'|...
=item padding => 'NO'|'PKCS1'|...
=item private_key => OBJECT|STRING|FILENAME
Required if you want to use this object to sign. See L<privateKey()|XML::Compile::WSS::Sign::RSA/"Attributes">
=item public_key => OBJECT|STRING|FILENAME
Required if you want to use this object to L<check()|XML::Compile::WSS::Sign::RSA/"Handlers">. See L<publicKey()|XML::Compile::WSS::Sign::RSA/"Attributes">
Usually, you need either the public or the private key, not both. However,
when you specify a private key, you can ask for the public key as well: it
is included.
=item sign_method => TYPE
=back
=back
=head2 Attributes
Extends L<"Attributes" in XML::Compile::WSS::Sign|XML::Compile::WSS::Sign/"Attributes">.
=over 4
=item $obj-E<gt>B<privateKey>( [$key, %options] )
The private key must be set with L<new(private_key)|XML::Compile::WSS::Sign::RSA/"Constructors"> or this method before
you can sign. This method will return the text of the key.
=over 4
=item * an Crypt::OpenSSL::RSA object
=item * PEM formatted key, as accepted by Crypt::OpenSSL::RSA method C<new_private_key()>
=item * a filename which contains such bytes.
=back
-Option --Default
hashing <undef>
padding <undef>
=over 2
=item hashing => 'SHA1'|'MD5'|'RIPEMD160'|...
Enforce an hashing setting on the $key.
=item padding => 'NO'|'PKCS1'|'PKCS1_OAEP'|'SSLv23'
=back
=item $obj-E<gt>B<privateKeyRSA>()
Returns the private key wrapped in a Crypt::OpenSSL::RSA object.
=item $obj-E<gt>B<publicKey>( [$key, %options] )
Set the public key. You can pass a $key, which is one of
=over 4
=item * an L<XML::Compile::WSS::SecToken::X509v3|XML::Compile::WSS::SecToken::X509v3> object
=item * an Crypt::OpenSSL::RSA object
=item * an Crypt::OpenSSL::X509 object
=back
=item $obj-E<gt>B<publicKeyRSA>()
Returns the Crypt::OpenSSL::RSA-wrapped public key.
=item $obj-E<gt>B<publicKeyString>('PKCS1'|'X509')
=item $obj-E<gt>B<signMethod>()
Inherited, see L<XML::Compile::WSS::Sign/"Attributes">
=item $obj-E<gt>B<toPrivateSHA>($private-$key)
=item XML::Compile::WSS::Sign::RSA-E<gt>B<toPrivateSHA>($private-$key)
=item $obj-E<gt>B<toPublicRSA>($object)
=item XML::Compile::WSS::Sign::RSA-E<gt>B<toPublicRSA>($object)
=back
=head2 Handlers
Extends L<"Handlers" in XML::Compile::WSS::Sign|XML::Compile::WSS::Sign/"Handlers">.
( run in 1.377 second using v1.01-cache-2.11-cpan-39bf76dae61 )