Commit 341bbb22 authored by Clément OUDOT's avatar Clément OUDOT

eval Lasso constants (#1312)

parent f0b2fda9
......@@ -3066,11 +3066,17 @@ sub metadata {
sub getSignatureMethod {
my ( $self, $signature_method ) = @_;
return Lasso::Constants::SIGNATURE_METHOD_RSA_SHA1
my $signature_method_rsa_sha1 =
eval 'Lasso::Constants::SIGNATURE_METHOD_RSA_SHA1';
my $signature_method_rsa_sha256 =
eval 'Lasso::Constants::SIGNATURE_METHOD_RSA_SHA256';
my $signature_method_none = eval 'Lasso::Constants::SIGNATURE_METHOD_NONE';
return $signature_method_rsa_sha1
if ( $signature_method =~ /^SHA1$/i );
return Lasso::Constants::SIGNATURE_METHOD_RSA_SHA256
return $signature_method_rsa_sha256
if ( $signature_method =~ /^SHA256$/i );
return Lasso::Constants::SIGNATURE_METHOD_NONE;
return $signature_method_none;
}
1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment