Result:
found 296 distributions and 1081 files matching your query ! ( run in 1.268 )


PDF-Sign

 view release on metacpan or  search on metacpan

examples/PDF-SIGN/openssl.cnf  view on Meta::CPAN

certificate	= $dir/cacert.pem 	# The CA certificate
serial		= $dir/serial 		# The current serial number
crlnumber	= $dir/crlnumber	# the current crl number
					# must be commented out to leave a V1 CRL
crl		= $dir/crl.pem 		# The current CRL
private_key	= $dir/private/cakey.pem# The private key

x509_extensions	= usr_cert		# The extensions to add to the cert

# Comment out the following two lines for the "traditional"
# (and highly broken) format.

 view all matches for this distribution


Padre-Plugin-Encrypt

 view release on metacpan or  search on metacpan

lib/Padre/Plugin/Encrypt.pm  view on Meta::CPAN

	my @layout = (
		[   [ 'Wx::StaticText', undef, 'Type:' ],
			[ 'Wx::ComboBox', '_type_', $type, \@types ],
		],
		[   [ 'Wx::StaticText', undef,           'Private key:' ],
			[ 'Wx::TextCtrl',   '_private_key_', '' ],
		],
		[   [ 'Wx::Button', '_ok_',     Wx::wxID_OK ],
			[ 'Wx::Button', '_cancel_', Wx::wxID_CANCEL ],
		],
	);

lib/Padre/Plugin/Encrypt.pm  view on Meta::CPAN

	);

	$dialog->{_widgets_}{_ok_}->SetDefault;
	Wx::Event::EVT_BUTTON( $dialog, $dialog->{_widgets_}{_ok_},     \&ok_clicked );
	Wx::Event::EVT_BUTTON( $dialog, $dialog->{_widgets_}{_cancel_}, \&cancel_clicked );
	$dialog->{_widgets_}{_private_key_}->SetFocus;

	$dialog->Show(1);
}

sub cancel_clicked {

lib/Padre/Plugin/Encrypt.pm  view on Meta::CPAN

	my $main = Padre->ide->wx->main;

	my $data = $dialog->get_data;
	$dialog->Destroy;

	my $private_key = $data->{_private_key_};
	unless ( length($private_key) ) {
		$main->message( Wx::gettext("Private key is required") );
		return;
	}

	my $type = $data->{_type_};

lib/Padre/Plugin/Encrypt.pm  view on Meta::CPAN

	return unless $doc;
	my $code = $doc->text_get;

	require Crypt::CBC;
	my $cipher = Crypt::CBC->new(
		-key    => $private_key,
		-cipher => 'Blowfish'
	);

	eval {
		if ( $type eq 'encrypt' )

 view all matches for this distribution


Parse-StackTrace

 view release on metacpan or  search on metacpan

t/100_parse_gdb.t  view on Meta::CPAN

            ??
            free
            load_encrypted_key
            parsed_pem_block
            egg_openssl_pem_parse
            gck_ssh_openssh_parse_private_key
            unlock_private_key
            realize_and_take_data
            gck_ssh_private_key_parse
        )],
    },
    # Ends in a frame that has an open-paren with no close-paren.
    'gnome-bug-579416' => {
        threads => 2,

 view all matches for this distribution



Pcore-API-Majestic

 view release on metacpan or  search on metacpan

lib/Pcore/API/Majestic.pm  view on Meta::CPAN

has username => ( is => 'ro', isa => Str );
has password => ( is => 'ro', isa => Str );

has api_key              => ( is => 'ro', isa => Maybe [Str] );    # direct access to the API, access is restricted by IP address
has openapp_access_token => ( is => 'ro', isa => Maybe [Str] );    # OpenApp access, user key, identify user
has openapp_private_key  => ( is => 'ro', isa => Maybe [Str] );    # OpenApp access, application vendor key, identify application
has bind_ip              => ( is => 'ro', isa => Maybe [Str] );

has _cookies        => ( is => 'ro', isa => HashRef,  init_arg => undef );
has _cookies_time   => ( is => 'ro', isa => Int,      init_arg => undef );
has _login_requests => ( is => 'ro', isa => ArrayRef, init_arg => undef );

lib/Pcore/API/Majestic.pm  view on Meta::CPAN


sub _request ( $self, $url_params, $cb ) {
    if ( $self->api_key ) {
        $url_params->{app_api_key} = $self->api_key;
    }
    elsif ( $self->openapp_private_key && $self->openapp_access_token ) {
        $url_params->{accesstoken} = $self->openapp_access_token;

        $url_params->{privatekey} = $self->openapp_private_key;
    }
    else {
        die q["api_key" or "openapp_private_key" and "openapp_access_token" are missed];
    }

    my $url = 'http://api.majestic.com/api/json?' . P->data->to_uri($url_params);

    P->http->get(

 view all matches for this distribution


Pcore

 view release on metacpan or  search on metacpan

lib/Pcore/API/Google/OAuth.pm  view on Meta::CPAN

};

sub BUILD ( $self, $args ) {
    $self->{key} = P->cfg->read( $self->{key} ) if !is_ref $self->{key};

    $self->{_openssl_rsa} = Crypt::OpenSSL::RSA->new_private_key( $self->{key}->{private_key} );

    $self->{_openssl_rsa}->use_sha256_hash;

    return;
}

 view all matches for this distribution


Perl-Critic-PolicyBundle-SNEZ

 view release on metacpan or  search on metacpan

t/Perl/Critic/Policy/ControlStructures/ProhibitMultipleSubscripts.run  view on Meta::CPAN

    }
    else {
        $cred_ref->{password} = default_password();
    }
    if ($cred_ref->{key}) {
        $cred_ref->{key} = encrypt_private_key($cred_ref->{key});
    }
    else {
        $cred_ref->{key} = default_key();
    }
}

t/Perl/Critic/Policy/ControlStructures/ProhibitMultipleSubscripts.run  view on Meta::CPAN

        and $cred_ref->{port} != 23
    ) {
        $cred_ref->{host} = $cred_ref->{host} . ':' . $cred_ref->{port};
    }
    $cred_ref->{password} = decrypt_password($cred_ref->{password}) if $cred_ref->{password};
    $cred_ref->{key} = decrypt_private_key($cred_ref->{key}) if $cred_ref->{key};
}

## name Nested subscript
## failures 0
## cut

 view all matches for this distribution


Plack-App-MCCS

 view release on metacpan or  search on metacpan

local/lib/perl5/x86_64-linux-thread-multi/Net/SSLeay.pm  view on Meta::CPAN

    NID_pkcs9_extCertAttributes
    NID_pkcs9_messageDigest
    NID_pkcs9_signingTime
    NID_pkcs9_unstructuredAddress
    NID_pkcs9_unstructuredName
    NID_private_key_usage_period
    NID_rc2_40_cbc
    NID_rc2_64_cbc
    NID_rc2_cbc
    NID_rc2_cfb64
    NID_rc2_ecb

 view all matches for this distribution


Plack-Middleware-Auth-OAuth

 view release on metacpan or  search on metacpan

t/oauth_rsa.t  view on Meta::CPAN

lRxOVeest+mBRKqPrEgKYpsjiduIT0MiqHFdGR7DhYGtV1Sgn75+WoLj/S9t58wg
a5eBaoJl/UzNBxENLgWoI3TtdYiZoXFysMjqsFIqQKFo/fLCyZ3pAgMBAAE=
-----END RSA PUBLIC KEY-----
__END_OF_INVALID__

my $private_key = <<__END_OF_PRIVATE__;
-----BEGIN RSA PRIVATE KEY-----
MIICWwIBAAKBgQDeIxWdTsSwC3SXIqz9HkNMnaGfA3N8nP1H1jET+SXN6zdM8Ckn
pWZKICP3A3YP2l7mcHRxcMCNq36q6bZLoIU96TyapjMfMwMdZ8fQkaY4S36BW3pv
sGvYXE1x5a/Sb0aEQAJ23Y7xxOQ0/p4kM6dhPx/QeGvTd7YQ4rQv1U0hVwIDAQAB
AoGAQHpwmLO3dd4tXn1LN0GkiUWsFyr6R66N+l8a6dBE/+uJpsSDPaXN9jA0IEwZ

t/oauth_rsa.t  view on Meta::CPAN

    oauth_consumer_key     => $args{consumer_key},
);

my $consumer = OAuth::Lite::Consumer->new(
    signature_method    => $params{oauth_signature_method},
    consumer_secret     => $private_key,
    realm           => $args{realm},
    _nonce          => $args{nonce},
    _timestamp      => $args{timestamp},
);

 view all matches for this distribution


PostgreSQLHosting

 view release on metacpan or  search on metacpan

Rexfile  view on Meta::CPAN

die('Missing providers')
  unless scalar grep { exists $conf->{providers}->{$_} } ALLOWED_PROVIDERS;

BEGIN {
  user 'root';
  private_key($ENV{PRIVATE_KEY} || die 'Missing PRIVATE_KEY');
  public_key(
    (
      -r $ENV{PRIVATE_KEY} . '.pub'
      ? $ENV{PRIVATE_KEY} . '.pub'
      : $ENV{PUBLIC_KEY}

 view all matches for this distribution


Postini-SAML

 view release on metacpan or  search on metacpan

lib/Postini/SAML.pm  view on Meta::CPAN

    # load the keyfile and prepare a context for signing
    open my $key_fh, '<', $key_file or croak "couldn't open $key_file for reading: $!";
    my $key_text = do { local $/; <$key_fh> };
    close $key_fh;

    my $key = Crypt::OpenSSL::RSA->new_private_key( $key_text );
    if ( not $key )
    {
        croak "failed to instantiate Crypt::OpenSSL::RSA object from $key_file";
    }

 view all matches for this distribution


Protocol-ACME

 view release on metacpan or  search on metacpan

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

      "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" );
    }

 view all matches for this distribution


Protocol-OTR

 view release on metacpan or  search on metacpan

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


    use Protocol::OTR qw( :constants );

    my $otr = Protocol::OTR->new(
        {
            privkeys_file => "otr.private_key",
            contacts_file => "otr.fingerprints",
            instance_tags_file => "otr.instance_tags",
        }
    );

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


=head2 new

    my $otr = Protocol::OTR->new(
        {
            privkeys_file => "otr.private_key",
            contacts_file => "otr.fingerprints",
            instance_tags_file => "otr.instance_tags",
        }
    );

 view all matches for this distribution


Puppet-Classify

 view release on metacpan or  search on metacpan

lib/Puppet/Classify.pm  view on Meta::CPAN

    my $uri = "https://".$self->server_name.":".$self->server_port."/classifier-api/v1/groups/$id";

    my $ssl_opts = { verify_hostname => 1, SSL_ca_file => $self->puppet_ssl_path."/certs/ca.pem" };
    if( $self->cert_name ){
        $ssl_opts->{SSL_cert_file} = $self->puppet_ssl_path."/certs/".$self->cert_name.".pem";
        $ssl_opts->{SSL_key_file} = $self->puppet_ssl_path."/private_keys/".$self->cert_name.".pem";
    } else {
        %headers = ( 'X-Authentication' => $self->access_token );
    }

    my $ua = LWP::UserAgent->new( timeout => $self->timeout, ssl_opts => $ssl_opts );

lib/Puppet/Classify.pm  view on Meta::CPAN

    my $uri = "https://".$self->server_name.":".$self->server_port."/classifier-api/v1/$action";
    my $req = HTTP::Request->new( $type, $uri );
    my $ssl_opts = { verify_hostname => 1, SSL_ca_file => $self->puppet_ssl_path."/certs/ca.pem" };
    if( $self->cert_name ){
        $ssl_opts->{SSL_cert_file} = $self->puppet_ssl_path."/certs/".$self->cert_name.".pem";
        $ssl_opts->{SSL_key_file} = $self->puppet_ssl_path."/private_keys/".$self->cert_name.".pem";
    } else {
        $req->header( 'X-Authentication' => $self->access_token );
    }
    my $ua = LWP::UserAgent->new( timeout => $self->timeout, ssl_opts => $ssl_opts );
    if( $type eq 'POST' ){

lib/Puppet/Classify.pm  view on Meta::CPAN

    my $uri = "https://".$self->server_name.":".$self->server_port."/classifier-api/v1/$action";
    my $req = HTTP::Request->new( 'GET', $uri );
    my $ssl_opts = { verify_hostname => 1, SSL_ca_file => $self->puppet_ssl_path."/certs/ca.pem" };
    if( $self->has_cert_name ){
        $ssl_opts->{SSL_cert_file} = $self->puppet_ssl_path."/certs/".$self->cert_name.".pem";
        $ssl_opts->{SSL_key_file} = $self->puppet_ssl_path."/private_keys/".$self->cert_name.".pem";
    } else {
        $req->header( 'X-Authentication' => $self->access_token );
    }
    my $ua = LWP::UserAgent->new( timeout => $self->timeout, ssl_opts => $ssl_opts );
    my $response = $ua->request( $req );

lib/Puppet/Classify.pm  view on Meta::CPAN

    my $uri = "https://".$self->server_name.":".$self->server_port."/classifier-api/v1/$action";
    my $req = HTTP::Request->new( 'POST', $uri );
    my $ssl_opts = { verify_hostname => 1, SSL_ca_file => $self->puppet_ssl_path."/certs/ca.pem" };
    if( $self->has_cert_name ){
        $ssl_opts->{SSL_cert_file} = $self->puppet_ssl_path."/certs/".$self->cert_name.".pem";
        $ssl_opts->{SSL_key_file} = $self->puppet_ssl_path."/private_keys/".$self->cert_name.".pem";
    } else {
        $req->header( 'X-Authentication' => $self->access_token );
    }
    my $ua = LWP::UserAgent->new( timeout => $self->timeout, ssl_opts => $ssl_opts );
    $req->header( 'Content-Type' => 'application/json' );

 view all matches for this distribution


RDF-Crypt

 view release on metacpan or  search on metacpan

lib/RDF/Crypt/Decrypter.pm  view on Meta::CPAN

sub decrypt_bytes
{
	my ($self, $text) = @_;
	$text = decode_base64($text);
	
	my $key = $self->private_key;
	my $block_size = $key->size - 16;
		
	my $iv = substr($text, 0, $block_size);
	my $removal_chars = unpack('n', substr($text, $block_size, 2));
	my $scrambled   = substr($text, $block_size + 2);

lib/RDF/Crypt/Decrypter.pm  view on Meta::CPAN


sub encrypt_bytes
{
	my ($self, $text) = @_;
	encode_base64(
		$self->private_key->private_encrypt($text)
	);
}

1;

 view all matches for this distribution


Rapi-Blog

 view release on metacpan or  search on metacpan

lib/Rapi/Blog.pm  view on Meta::CPAN


sub _enforce_valid_recaptcha_config {
  my $self = shift;
  my $cfg = $self->recaptcha_config or return 1; # No config at all is valid
  
  my @valid_keys = qw/public_key private_key verify_url strict_mode/;
  my %keys = map {$_=>1} @valid_keys;
  for my $k (keys %$cfg) {
    $keys{$k} or die join('',
      "Unknown recaptcha_config param '$k' - ",
      "only valid params are: ",join(', ',@valid_keys)
    )
  }
  
  die "Invalid recaptcha_config - both 'public_key' and 'private_key' params are required"
    unless ($cfg->{public_key} && $cfg->{private_key});
  
  if(exists $cfg->{strict_mode}) {
    my $v = $cfg->{strict_mode};
    my $disp = defined $v ? "'$v'" : 'undef';
    die "Bad value $disp for 'strict_mode' in recaptcha_config - must be either 1 (true) or 0 (false)\n"

lib/Rapi/Blog.pm  view on Meta::CPAN

=head3 public_key

Required. The public, or "SITE KEY" provided by the Google reCAPTCHA settings, after being setup in the 
Google reCAPTCHA system L<www.google.com/recaptcha/admin|http://www.google.com/recaptcha/admin>

=head3 private_key

Required. The private, or "SECRET KEY" provided by the Google reCAPTCHA settings, after being setup in the 
Google reCAPTCHA system L<www.google.com/recaptcha/admin|http://www.google.com/recaptcha/admin>. Both the
C<public_key> and the C<private_key> are provided as a pair and both are required.

=head3 verify_url

Optional URL to use when performing the actual reCAPCTHA validation with Google. Defaults to 
C<https://www.google.com/recaptcha/api/siteverify> which should probably never need to be changed.

 view all matches for this distribution


Redis-Cluster-Fast

 view release on metacpan or  search on metacpan

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

/* Options to create an OpenSSL context. */
typedef struct {
    const char *cacert_filename;
    const char *capath;
    const char *cert_filename;
    const char *private_key_filename;
    const char *server_name;
    int verify_mode;
} redisSSLOptions;

/**

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * and use for validation.
 *
 * capath is an optional directory path where trusted CA certificate files are
 * stored in an OpenSSL-compatible structure.
 *
 * cert_filename and private_key_filename are optional names of a client side
 * certificate and private key files to use for authentication. They need to
 * be both specified or omitted.
 *
 * server_name is an optional and will be used as a server name indication
 * (SNI) TLS extension.

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * If error is non-null, it will be populated in case the context creation fails
 * (returning a NULL).
 */

redisSSLContext *redisCreateSSLContext(const char *cacert_filename, const char *capath,
        const char *cert_filename, const char *private_key_filename,
        const char *server_name, redisSSLContextError *error);

/**
  * Helper function to initialize an OpenSSL context that can be used
  * to initiate SSL connections. This is a more extensible version of redisCreateSSLContext().

 view all matches for this distribution


Redis-Fast

 view release on metacpan or  search on metacpan

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

/* Options to create an OpenSSL context. */
typedef struct {
    const char *cacert_filename;
    const char *capath;
    const char *cert_filename;
    const char *private_key_filename;
    const char *server_name;
    int verify_mode;
} redisSSLOptions;

/**

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * and use for validation.
 *
 * capath is an optional directory path where trusted CA certificate files are
 * stored in an OpenSSL-compatible structure.
 *
 * cert_filename and private_key_filename are optional names of a client side
 * certificate and private key files to use for authentication. They need to
 * be both specified or omitted.
 *
 * server_name is an optional and will be used as a server name indication
 * (SNI) TLS extension.

deps/hiredis/hiredis_ssl.h  view on Meta::CPAN

 * If error is non-null, it will be populated in case the context creation fails
 * (returning a NULL).
 */

redisSSLContext *redisCreateSSLContext(const char *cacert_filename, const char *capath,
        const char *cert_filename, const char *private_key_filename,
        const char *server_name, redisSSLContextError *error);

/**
  * Helper function to initialize an OpenSSL context that can be used
  * to initiate SSL connections. This is a more extensible version of redisCreateSSLContext().

 view all matches for this distribution


Restish-Client

 view release on metacpan or  search on metacpan

lib/Restish/Client.pm  view on Meta::CPAN

        agent_options       => { timeout => 5 },
        require_https       => 1,
        ssl_opts => {
            SSL_use_cert    => 1,
            SSL_cert_file   => "/etc/ssl/certs/cert.pem",
            SSL_key_file    => "/etc/ssl/private_keys/key.pem",
        },
        cookie_jar          => 1,
    );

Construct a new Restish::Client object. The uri_host is used as the base

 view all matches for this distribution


Rex-GPU

 view release on metacpan or  search on metacpan

eg/hetzner-gpu.pl  view on Meta::CPAN

my $key  = $ENV{REX_KEY}  || "$ENV{HOME}/.ssh/id_ed25519";
my $user = $ENV{REX_USER} || 'root';

set connection  => 'LibSSH';
set user        => $user;
set private_key => $key;
set public_key  => "$key.pub";
set auth        => 'key';

group 'avatar' => 'avatar.conflict.industries';

 view all matches for this distribution


Rex-Inline

 view release on metacpan or  search on metacpan

lib/Rex/Inline.pm  view on Meta::CPAN

    use_debug => 0
    # now you can set default authentication
    user => $user,              # optional
    password => $password,      # optional
    public_key => $public_key,  # optional
    private_key => $private_key,# optional
  );

  # add default authentication 
  # if you didn't provide authentication in your task, Rex::Inline will use this as default one
  # or if your authentication is failed, Rex::Inline will use this retry the ssh connection

lib/Rex/Inline.pm  view on Meta::CPAN

    sudo => TRUE,
  });
  $rex_inline->add_auth({
    user => $user,
    public_key => $public_key,
    private_key => $private_key,
  });

  # data reference like this
  $rex_inline->add_task(
    {

lib/Rex/Inline.pm  view on Meta::CPAN

      server => [@server],
      # if need password
      password => $password,
      # optional
      public_key => $public_key,
      private_key => $private_key,
    }
  );

  # or Rex::Inline::Test is based on Rex::Inline::Base module
  # See Rex::Inline::Base Documents

lib/Rex/Inline.pm  view on Meta::CPAN

      server => [@server],
      # if need password
      password => $password,
      # optional
      public_key => $public_key,
      private_key => $private_key,
      # input param, in any format you want
      input => $input,
    )
  );

lib/Rex/Inline.pm  view on Meta::CPAN


=item password

set default ssh connection password

=item private_key

set default private_key filename

=item public_key

set default public_key filename

=cut

has [qw(user password private_key public_key)] => (is => 'ro', predicate => 1);

=item use_debug

set/get debug option (Bool)

lib/Rex/Inline.pm  view on Meta::CPAN

      server => [@server2],
      # if need password
      password => $password2,
      # optional
      public_key => $public_key2,
      private_key => $private_key2,
  });

  ...

=cut

lib/Rex/Inline.pm  view on Meta::CPAN

    sudo => TRUE,
  });
  $rex_inline->add_auth({
    user => $user,
    public_key => $public_key,
    private_key => $private_key,
  });

=cut

has auth => (

lib/Rex/Inline.pm  view on Meta::CPAN


  ### default auth
  my @default_auth;
  if ($self->{user}) {
    @default_auth = ( user => $self->{user} );
    for (qw(password public_key private_key)) {
      push @default_auth, $_ => $self->{$_} if $self->{$_};
    }
  }
  $self->add_auth({@default_auth}) if @default_auth;

 view all matches for this distribution


Rex-JobControl

 view release on metacpan or  search on metacpan

lib/Rex/JobControl/Helper/Project/Rexfile.pm  view on Meta::CPAN


      if ( exists $srv_object->{auth}->{public_key} ) {
        $ENV{REX_PUBLIC_KEY} = $srv_object->{auth}->{public_key};
      }

      if ( exists $srv_object->{auth}->{private_key} ) {
        $ENV{REX_PRIVATE_KEY} = $srv_object->{auth}->{private_key};
      }

      if ( exists $srv_object->{auth}->{user} ) {
        $ENV{REX_USER} = $srv_object->{auth}->{user};
      }

 view all matches for this distribution


Rex-LibSSH

 view release on metacpan or  search on metacpan

lib/Rex/Interface/Connection/LibSSH.pm  view on Meta::CPAN

    my $server   = $opt{server};
    my $port     = $opt{port}     || Rex::Config->get_port( server => $server )    || 22;
    my $timeout  = $opt{timeout}  || Rex::Config->get_timeout( server => $server ) || 10;
    my $user     = $opt{user};
    my $password = $opt{password};
    my $privkey  = $opt{private_key};
    my $auth     = $opt{auth_type} // 'key';

    $self->{server}        = $server;
    $self->{is_sudo}       = $opt{sudo};
    $self->{__auth_info__} = \%opt;

 view all matches for this distribution


Rex-Rancher

 view release on metacpan or  search on metacpan

.claude/skills/rex/SKILL.md  view on Meta::CPAN

host_entry 'myhost.internal', ip => '127.0.1.1', aliases => ['myhost'];
```

Authentication:
```perl
Rex::Config->set_private_key('/root/.ssh/id_ed25519');
Rex::Config->set_public_key('/root/.ssh/id_ed25519.pub');
```

Host key checking is disabled by default (`strict_hostkeycheck => 0`).

 view all matches for this distribution


Rex

 view release on metacpan or  search on metacpan

lib/Rex.pm  view on Meta::CPAN


 Rex::connect(
   server    => "remotehost",
   user      => "root",
   password   => "f00b4r",
   private_key => "/path/to/private/key/file",
   public_key  => "/path/to/public/key/file",
 );

 if(is_file("/foo/bar")) {
   print "Do something...\n";

 view all matches for this distribution


SPVM-Net-SSLeay

 view release on metacpan or  search on metacpan

lib/SPVM/Net/SSLeay/Constant.pm  view on Meta::CPAN


C<static method NID_pkcs9_unstructuredName : int ();>

Returns the value of C<NID_pkcs9_unstructuredName>. If this constant is not defined on the system, an exception is thrown with the error id set to the basic type ID of the L<Error::NotSupported|SPVM::Error::NotSupported> class.

=head2 NID_private_key_usage_period

C<static method NID_private_key_usage_period : int ();>

Returns the value of C<NID_private_key_usage_period>. If this constant is not defined on the system, an exception is thrown with the error id set to the basic type ID of the L<Error::NotSupported|SPVM::Error::NotSupported> class.

=head2 NID_rc2_40_cbc

C<static method NID_rc2_40_cbc : int ();>

 view all matches for this distribution


STIX

 view release on metacpan or  search on metacpan

lib/STIX/Observable/Type/X509V3Extensions.pm  view on Meta::CPAN

    'http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/observables/x509-certificate.json#/definitions/x509-v3-extensions-type';

use constant PROPERTIES => (qw(
    basic_constraints name_constraints policy_constraints key_usage extended_key_usage subject_key_identifier
    authority_key_identifier subject_alternative_name issuer_alternative_name subject_directory_attributes
    crl_distribution_points inhibit_any_policy private_key_usage_period_not_before
    private_key_usage_period_not_after certificate_policies policy_mappings
));

has basic_constraints            => (is => 'rw', isa => Str);
has name_constraints             => (is => 'rw', isa => Str);
has policy_constraints           => (is => 'rw', isa => Str);

lib/STIX/Observable/Type/X509V3Extensions.pm  view on Meta::CPAN

has issuer_alternative_name      => (is => 'rw', isa => Str);
has subject_directory_attributes => (is => 'rw', isa => Str);
has crl_distribution_points      => (is => 'rw', isa => Str);
has inhibit_any_policy           => (is => 'rw', isa => Str);

has private_key_usage_period_not_before => (
    is     => 'rw',
    isa    => InstanceOf ['STIX::Common::Timestamp'],
    coerce => sub { ref($_[0]) ? $_[0] : STIX::Common::Timestamp->new($_[0]) },
);

has private_key_usage_period_not_after => (
    is     => 'rw',
    isa    => InstanceOf ['STIX::Common::Timestamp'],
    coerce => sub { ref($_[0]) ? $_[0] : STIX::Common::Timestamp->new($_[0]) },
);

lib/STIX/Observable/Type/X509V3Extensions.pm  view on Meta::CPAN

=item $x509_v3_extensions_type->policy_mappings

Specifies one or more pairs of OIDs; each pair includes an
issuerDomainPolicy and a subjectDomainPolicy

=item $x509_v3_extensions_type->private_key_usage_period_not_after

Specifies the date on which the validity period ends for the private key,
if it is different from the validity period of the certificate.

=item $x509_v3_extensions_type->private_key_usage_period_not_before

Specifies the date on which the validity period begins for the private key,
if it is different from the validity period of the certificate.

=item $x509_v3_extensions_type->subject_alternative_name

 view all matches for this distribution


Slovo-Plugin-Prodan

 view release on metacpan or  search on metacpan

lib/Slovo/Controller/Poruchki.pm  view on Meta::CPAN


  # POST to Econt to create order
  my $_order_struct = $c->_order_struct($o);
  my $eco_res       = $app->ua->request_timeout(5)->post(
    $shop->{crupdate_order_endpoint} =>
      {'Content-Type' => 'application/json', Authorization => $shop->{private_key}},
    json => $_order_struct
  )->res;
  $c->debug(
    'req_url: '        => $shop->{crupdate_order_endpoint},
    ' $_order_struct:' => $_order_struct

lib/Slovo/Controller/Poruchki.pm  view on Meta::CPAN

  # $c->debug('Poruchka:' => $o);
  # POST to Econt to create order
  my $_order_struct = $c->_order_struct($o);
  my $eco_res       = $c->app->ua->request_timeout(5)->post(
    $shop->{create_awb_endpoint} =>
      {'Content-Type' => 'application/json', Authorization => $shop->{private_key}},
    json => $_order_struct
  )->res;
  $c->debug(
    'req_url: '        => $shop->{create_awb_endpoint},
    ' $_order_struct:' => $_order_struct

lib/Slovo/Controller/Poruchki.pm  view on Meta::CPAN

  # TODO: some logic to use the right shop. We may have multiple
  # shops(physical stores) from which we send the orders.  For example we may
  # choose the shop depending on the IP-location of the user. We want to use
  # the closest store to the user to minimise delivery expenses.

  # Copy data without private_key.
  state $shop = {map { $_ eq 'private_key' ? () : ($_ => $c->config->{shop}{$_}) }
      keys %{$c->config->{shop}}};
  return $c->render(openapi => $shop);
}

# GET /api/gdpr_consent

 view all matches for this distribution


Socket-Class

 view release on metacpan or  search on metacpan

xs/sc_ssl/CTX.pod  view on Meta::CPAN


=head2 Functions in alphabetical order

=over

L<check_private_key|Socket::Class::SSL::CTX/check_private_key>,
L<enable_compatibility|Socket::Class::SSL::CTX/enable_compatibility>,
L<new|Socket::Class::SSL::CTX/new>,
L<set_certificate|Socket::Class::SSL::CTX/set_certificate>,
L<set_cipher_list|Socket::Class::SSL::CTX/set_cipher_list>,
L<set_client_ca|Socket::Class::SSL::CTX/set_client_ca>,
L<set_private_key|Socket::Class::SSL::CTX/set_private_key>,
L<set_ssl_method|Socket::Class::SSL::CTX/set_ssl_method>,
L<set_verify_locations|Socket::Class::SSL::CTX/set_verify_locations>,

=back

xs/sc_ssl/CTX.pod  view on Meta::CPAN

I<thanks to J. Nick Koston>

  use Socket::Class::SSL;
  
  %ssl_args = (
      'private_key' => '/path/to/server.key.pem',
      'certificate' => '/path/to/server.crt.pem',
      'cipher_list' => 'ALL:!ADH:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP'
  );
  
  # create shared context

xs/sc_ssl/CTX.pod  view on Meta::CPAN

Additional arguments for the constructor.

=for formatter none

  certificate    Path to certificate file in PEM format
  private_key    Path to private key file in PEM format
  client_ca      Path to PEM formatted file with CA certificates
                 to send to the client
  ca_file        A file of CA certificates in PEM format
  ca_path        A directory containing CA certificates in PEM format
  ssl_method     One of "SSLv2", "SSLv23", "SSLv3" or "TLSv1"

xs/sc_ssl/CTX.pod  view on Meta::CPAN


B<Return Values>

Returns a TRUE value on success or UNDEF on failure.

=item B<set_private_key ( $private_key )>

Adds a private key to the socket.
To change a certificate, private key pair the new certificate needs
to be set before setting the private key.

B<Parameters>

=over

=item I<$private_key>

Path to private key file in PEM format.

=back

B<Return Values>

Returns a TRUE value on success or UNDEF on failure.

=item B<check_private_key ()>

Verifies that the private key agrees with the corresponding public key
in the certificate.

Returns a TRUE value on success or UNDEF on failure.

 view all matches for this distribution


Solstice

 view release on metacpan or  search on metacpan

examples/webservice_example.pl  view on Meta::CPAN

use warnings;
use Digest::SHA1 qw(sha1_hex);
use LWP::UserAgent;


my $private_key = '12345';
my $public_id = 'mcrawfor';

my $content = '';

my $host = "http://solstice.washington.edu";

examples/webservice_example.pl  view on Meta::CPAN

my $method = "GET";

#build auth key
my $date = localtime;
my $content_sha1 = $content ? sha1_hex($content) : '';
my $to_sign = "$private_key\n$method\n$url\n$date\n$content_sha1";
my $auth_key = "SolAuth $public_id:". sha1_hex($to_sign);


my $ua = LWP::UserAgent->new;
$ua->agent("Solstice Webservices Client/0.1 ");

 view all matches for this distribution


( run in 1.268 second using v1.01-cache-2.11-cpan-39bf76dae61 )