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
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
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
view release on metacpan or search on metacpan
bin/playwright_server view on Meta::CPAN
// var theFile = path.dirname(sharedir) + '/api.json';
// let rawdata = fs.readFileSync(theFile);
// This is automatically inserted via sed
let spec =
[{"name":"APIRequest","spec":[{"type":"text","text":"Exposes API that can be used for the Web API testing. This class is used for creatingâµ`APIRequestContext` instance which in turn can be used for sending web requests. An instanceâµof this class ...
function arr2hash (arr,primary_key) {
var inside_out = {};
for (var item of arr) {
inside_out[item.name] = item;
view all matches for this distribution
view release on metacpan or search on metacpan
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
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
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
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
view release on metacpan or search on metacpan
example/Notify/lib/Notify.pm view on Meta::CPAN
# the old one would be undeliverable in silence. `punk push keys` prints a
# pair; bin/seed.pl puts one in var/ for the demo.
plugin 'Push' => {
subject => $ENV{PUSH_SUBJECT} || 'mailto:demo@example.com',
public_key => $ENV{VAPID_PUBLIC} || '',
private_key => $ENV{VAPID_PRIVATE} || '',
};
get '/' => 'Web::Root#index', { name => 'home' };
get '/login' => 'Web::Root#login_form', { name => 'login' };
post '/login' => 'Web::Root#login';
view all matches for this distribution
view release on metacpan or search on metacpan
t/1200-config.t view on Meta::CPAN
# These assert the silence, so reintroducing it fails here rather than in
# somebody's boot log.
{
unlink "$dir/punk.local.yml" if -e "$dir/punk.local.yml";
for my $key (qw(password passwd secret token api_key private_key
credentials auth)) {
write_file('punk.yml', "thing:\n $key: something\n");
my @warned;
{
local $SIG{__WARN__} = sub { push @warned, $_[0] };
view all matches for this distribution
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
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
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
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
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
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
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
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
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
view release on metacpan or search on metacpan
eg/hetzner-gpu.Rexfile view on Meta::CPAN
# --- Connection ---
set connection => 'LibSSH';
set user => ($ENV{REX_USER} || 'root');
set private_key => ($ENV{REX_KEY} || "$ENV{HOME}/.ssh/id_ed25519");
set public_key => ($ENV{REX_KEY} ? "$ENV{REX_KEY}.pub" : "$ENV{HOME}/.ssh/id_ed25519.pub");
set auth => 'key';
# ============================================================
# Main deployment
view all matches for this distribution
view release on metacpan or search on metacpan
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
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
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
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
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
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
view release on metacpan or search on metacpan
lib/Steemit/WsClient.pm view on Meta::CPAN
use Data::Dumper;
has url => 'https://api.steemit.com/';
has ua => sub { Mojo::UserAgent->new };
has posting_key => undef;
has plain_posting_key => \&_transform_private_key;
=head2 all database api methods of the steemit api
L<https://github.com/steemit/steem/blob/master/libraries/app/database_api.cpp>
lib/Steemit/WsClient.pm view on Meta::CPAN
extensions => [],
signatures => [],
};
my $serialized_transaction = $self->_serialize_transaction_message( $transaction );
my $bin_private_key = $self->plain_posting_key;
require Steemit::ECDSA;
my ( $r, $s, $i ) = Steemit::ECDSA::ecdsa_sign( $serialized_transaction, Math::BigInt->from_bytes( $bin_private_key ) );
$i += 4;
$i += 27;
my $signature = join('', map { unpack 'H*', $_ } ( pack("C", $i ), map { $_->as_bytes} ($r,$s )) );
unless( Steemit::ECDSA::is_signature_canonical_canonical( pack "H*", $signature ) ){
lib/Steemit/WsClient.pm view on Meta::CPAN
return $self->{public_posting_key}
}
sub _transform_private_key {
my( $self ) = @_;
die "posting_key missing" unless( $self->posting_key );
my $base58 = $self->posting_key;
require Steemit::Base58;
my $binary = Steemit::Base58::decode_base58( $base58 );
my $version = substr( $binary, 0, 1 );
my $binary_private_key = substr( $binary, 1, -4);
my $checksum = substr( $binary, -4);
die "invalid version in wif ( 0x80 needed ) " unless $version eq pack "H*", '80';
require Digest::SHA;
my $generated_checksum = substr( Digest::SHA::sha256( Digest::SHA::sha256( $version.$binary_private_key )), 0, 4 );
die "invalid checksum " unless $generated_checksum eq $checksum;
return $binary_private_key;
}
sub _serialize_transaction_message {
my ($self,$transaction) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Highlight/Engine/Kate/PHP_PHP.pm view on Meta::CPAN
'openssl_public_decrypt',
'openssl_public_encrypt',
'openssl_seal',
'openssl_sign',
'openssl_verify',
'openssl_x509_check_private_key',
'openssl_x509_checkpurpose',
'openssl_x509_export',
'openssl_x509_export_to_file',
'openssl_x509_free',
'openssl_x509_parse',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Highlight/Universal/hrc/inet/php-gen.hrc view on Meta::CPAN
<word name="openssl_public_encrypt"/>
<word name="openssl_seal"/>
<word name="openssl_sign"/>
<word name="openssl_verify"/>
<word name="openssl_x509_checkpurpose"/>
<word name="openssl_x509_check_private_key"/>
<word name="openssl_x509_export"/>
<word name="openssl_x509_export_to_file"/>
<word name="openssl_x509_free"/>
<word name="openssl_x509_parse"/>
<word name="openssl_x509_read"/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Syntax/Kamelon/XML/php.xml view on Meta::CPAN
<item>openssl_public_decrypt</item>
<item>openssl_public_encrypt</item>
<item>openssl_seal</item>
<item>openssl_sign</item>
<item>openssl_verify</item>
<item>openssl_x509_check_private_key</item>
<item>openssl_x509_checkpurpose</item>
<item>openssl_x509_export</item>
<item>openssl_x509_export_to_file</item>
<item>openssl_x509_free</item>
<item>openssl_x509_parse</item>
view all matches for this distribution