Protocol-ACME

 view release on metacpan or  search on metacpan

lib/Protocol/ACME.pm  view on Meta::CPAN

    };
    if ( $@ )
    {
      die "Invoked usage requires Crypt::OpenSSL::RSA and Crypt::OpenSSL::Bignum. " .
      "To avoid these dependencies use the openssl parameter when creating the " .
      "Protocol::ACME object.  This will use a native openssl binary instead.";
    }

    eval
    {
      $key = Crypt::OpenSSL::RSA->new_private_key($keystring);
    };
    if ( $@ )
    {
      _throw( "Error creating a key structure from the account key" );
    }
  }

  if ( ! $key )
  {
    _throw( "Could not load account key into key structure" );

lib/Protocol/ACME/Key.pm  view on Meta::CPAN


sub new
{
  my ($class, %opts) = @_;

  my $key = Crypt::RSA::Parse::private($opts{'keystring'});

  my $self = {
    _keystring => $opts{'keystring'},
    _openssl_bin => $opts{'openssl'},
    _private_key => $key,
    e => Math::BigInt->new( $key->publicExponent() ),
    n => $key->modulus(),
  };

  return bless $self, $class;
}

sub use_sha256_hash
{
  # NOOP for compatibility with Crypt::OpenSSL::RSA

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.684 second using v1.00-cache-2.02-grep-82fe00e-cpan-2cc899e4a130 )