| 1 | package Crypt::Perl::X::ECDSA::CharacteristicTwoUnsupported; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use parent 'Crypt::Perl::X::Base'; | ||
| 7 | |||
| 8 | sub new { | ||
| 9 | my ($class, $curve_name) = @_; | ||
| 10 | |||
| 11 | if ($curve_name) { | ||
| 12 | return $class->SUPER::new( "This library does not support ECDSA curves that use Characteristic-2 fields, like “$curve_name”.", { curve_name => $curve_name } ); | ||
| 13 | } | ||
| 14 | |||
| 15 | return $class->SUPER::new( "This library does not support ECDSA curves that use Characteristic-2 fields." ); | ||
| 16 | } | ||
| 17 | |||
| 18 | 1; |