Result:
found 274 distributions and 1006 files matching your query ! ( run in 0.932 )


WWW-LetsEncrypt

 view release on metacpan or  search on metacpan

lib/WWW/LetsEncrypt/JWK.pm  view on Meta::CPAN

This function, when implemented, should accept a private key string as a parameter and return new JSON Web Key.

Input

	{
		private_key => $scalar string of the private key to use,
	}

Output

	JWK Object

 view all matches for this distribution


WWW-Marvel

 view release on metacpan or  search on metacpan

examples/all_characters_names.pl  view on Meta::CPAN

use WWW::Marvel::Response;

my $cfg = WWW::Marvel::Config::File->new();
my $client = WWW::Marvel::Client->new({
	public_key  => $cfg->get_public_key,
	private_key => $cfg->get_private_key,
});

my $total_records = undef;
my $founded = 0;
my $offset = 0;

 view all matches for this distribution


WWW-OneAll

 view release on metacpan or  search on metacpan

lib/WWW/OneAll.pm  view on Meta::CPAN


sub new {    ## no critic (ArgUnpacking)
    my $class = shift;
    my %args  = @_ % 2 ? %{$_[0]} : @_;

    for (qw/subdomain public_key private_key/) {
        $args{$_} || croak "Param $_ is required.";
    }

    $args{endpoint} ||= "https://" . $args{subdomain} . ".api.oneall.com";
    $args{timeout}  ||= 60;                                                  # for ua timeout

lib/WWW/OneAll.pm  view on Meta::CPAN

    my $ref_url_params = delete $params{query_params};
    my $query_params   = "?";
    $query_params = $query_params . join("&", @$ref_url_params) if $ref_url_params;

    my $ua     = $self->__ua;
    my $header = {Authorization => 'Basic ' . b64_encode($self->{public_key} . ':' . $self->{private_key}, '')};
    $header->{'Content-Type'} = 'application/json' if %params;
    my @extra = %params ? (json => \%params) : ();
    my $tx    = $ua->build_tx($method => $self->{endpoint} . $url . '.json' . $query_params => $header => @extra);
    $tx->req->headers->accept('application/json');

lib/WWW/OneAll.pm  view on Meta::CPAN

    use WWW::OneAll;
    my $connection_token;
    my $oneall = WWW::OneAll->new(
        subdomain   => 'your_subdomain',
        public_key  => 'pubkey12-629b-4020-83fe-38af46e27b06',
        private_key => 'prikey12-a7ec-48f5-b9bc-737eb74146a4',
    );
    my $data = $oneall->connection($connection_token) or die $oneall->errstr;

=head1 DESCRIPTION

lib/WWW/OneAll.pm  view on Meta::CPAN


=item * subdomain

=item * public_key

=item * private_key

all required. get from API Settings L<https://app.oneall.com/applications/application/settings/api/>

=back

 view all matches for this distribution


WWW-Phanfare-API

 view release on metacpan or  search on metacpan

lib/WWW/Phanfare/API.pm  view on Meta::CPAN

  $method =~ s/.*://;   # strip fully-qualified portion
  croak "method not defined" unless $method;

  # Verify keys are defined
  croak 'api_key not defined' unless $self->{api_key};
  croak 'private_key not defined' unless $self->{private_key};

  my %param = @_;

  # Is POST content included
  delete $param{content} if my $content = $param{content};

lib/WWW/Phanfare/API.pm  view on Meta::CPAN

    sprintf('%s=%s', 'api_key', $self->{api_key}),
    sprintf('%s=%s', 'method', $method),
    map { sprintf '%s=%s', $_, (defined $param{$_} ? $param{$_} : '') } keys %param;

  # Sign request string
  my $sig = md5_hex( $req . $self->{private_key} );

  # Build URL escaped request string
  $req = join '&',
    sprintf('%s=%s', 'api_key', $self->{api_key}),
    sprintf('%s=%s', 'method', $method),

lib/WWW/Phanfare/API.pm  view on Meta::CPAN

Create agent. Developer API keys required.

    use WWW::Phanfare::API;
    my $api = WWW::Phanfare::API->new(
      api_key     => 'xxx',
      private_key => 'yyy',
    );

Authentication with account:

    my $session = $api->Authenticate(

lib/WWW/Phanfare/API.pm  view on Meta::CPAN

=head1 SUBROUTINES/METHODS

Refer to methods and required parameters are listed on
http://help.phanfare.com/index.php/API .

api_key and private_key is only required for the constructor,
not for individual methods.

Methods return hash references.
The value of the 'stat' key will be 'ok' if the call succeeded.
Value of 'code_value' key has error message.

 view all matches for this distribution


WWW-Phanfare-Class

 view release on metacpan or  search on metacpan

lib/WWW/Phanfare/Class.pm  view on Meta::CPAN

use WWW::Phanfare::Class::CacheAPI;
use WWW::Phanfare::API;
use WWW::Phanfare::Class::Account;

has 'api_key'       => ( is=>'ro', isa=>'Str', required=>1 );
has 'private_key'   => ( is=>'ro', isa=>'Str', required=>1 );
has 'email_address' => ( is=>'ro', isa=>'Str' );
has 'password'      => ( is=>'ro', isa=>'Str' );
sub _childclass { 'WWW::Phanfare::Class::Account' }

# Initialize account

lib/WWW/Phanfare/Class.pm  view on Meta::CPAN

  my $self = shift;

  # Create an API Agent
  WWW::Phanfare::Class::CacheAPI->new(
    api_key     => $self->api_key,
    private_key => $self->private_key,
  );
}


# Get a subnode, by name of name.id

lib/WWW/Phanfare/Class.pm  view on Meta::CPAN


    use WWW::Phanfare::Class;

    $class = WWW::Phanfare::Class->new(
      api_key       => 'secret',
      private_key   => 'secret',
      email_address => 's@c.et',
      password      => 'secret',
    );

    # Site Name

 view all matches for this distribution


WWW-Suffit-API

 view release on metacpan or  search on metacpan

lib/WWW/Suffit/Server/API/Admin.pm  view on Meta::CPAN

        "id": 3,
        "name": "Test User",
        "not_after": null,
        "not_before": 1678741533,
        "password": "9f86...0a08",
        "private_key": "",
        "public_key": "",
        "role": "Test user",
        "username": "test"
      }
    ]

lib/WWW/Suffit/Server/API/Admin.pm  view on Meta::CPAN

        "algorithm": "SHA256",
        "role": "Test user",
        "flags": 0,
        "not_after": null,
        "public_key": null,
        "private_key": null,
        "attributes": null,
        "comment": "Test user for unit testing only"
      }' \
      https://owl.localhost:8695/api/admin/user

lib/WWW/Suffit/Server/API/Admin.pm  view on Meta::CPAN

      "id": 13,
      "name": "Bob",
      "not_after": 0,
      "not_before": 1683893750,
      "password": "81b6...8ce9",
      "private_key": "-----BEGIN RSA PRIVATE KEY-----...",
      "public_key": "-----BEGIN RSA PUBLIC KEY-----...",
      "role": "Test user",
      "status": true,
      "username": "bob"
    }

lib/WWW/Suffit/Server/API/Admin.pm  view on Meta::CPAN

      "id": 3,
      "name": "Test User",
      "not_after": null,
      "not_before": 1678741533,
      "password": "9f86...0a08",
      "private_key": "",
      "public_key": "",
      "role": "Test user",
      "status": true,
      "username": "test"
    }

lib/WWW/Suffit/Server/API/Admin.pm  view on Meta::CPAN

        "algorithm": "SHA256",
        "role": "Test user",
        "flags": 0,
        "not_after": null,
        "public_key": null,
        "private_key": null,
        "attributes": null,
        "comment": "Test user for unit testing only"
      }' \
      https://owl.localhost:8695/api/admin/user/bob

lib/WWW/Suffit/Server/API/Admin.pm  view on Meta::CPAN

      "id": 13,
      "name": "Bob Bob",
      "not_after": 0,
      "not_before": 1683894066,
      "password": "81b6...8ce9",
      "private_key": "-----BEGIN RSA PRIVATE KEY-----...",
      "public_key": "-----BEGIN RSA PUBLIC KEY-----...",
      "role": "Test user",
      "status": true,
      "username": "bob"
    }

lib/WWW/Suffit/Server/API/Admin.pm  view on Meta::CPAN

    # Get not_after
    my $is_disabled = $self->req->json('/disabled') || 0;
    $data{not_after} = $is_disabled ? time() : undef;

    # Text fields
    foreach my $k (qw/public_key private_key attributes comment/) {
        my $v = $self->req->json("/$k") // '';
        $data{$k} = $v;
    }

    # Gen RSA keys
    unless (length($data{public_key}) || length($data{private_key})) {
        my %ks = $self->gen_rsakeys();
        return $self->reply->json_error(500 => "E1215" => $ks{error}) if $ks{error};
        $data{$_} = $ks{$_} for qw/public_key private_key/;
    }

    # Set user data
    $authdb->user_set(%data)
        or return $self->reply->json_error($authdb->code, $authdb->error || "E1216: Can't set user data to authorization database");

 view all matches for this distribution


WWW-Suffit-AuthDB

 view release on metacpan or  search on metacpan

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

        "flags"         INTEGER DEFAULT 0, -- Flags
        "created"       INTEGER DEFAULT NULL, -- Created at
        "not_before"    INTEGER DEFAULT NULL, -- Not Before
        "not_after"     INTEGER DEFAULT NULL, -- Not After
        "public_key"    TEXT DEFAULT NULL, -- Public Key (RSA/X509)
        "private_key"   TEXT DEFAULT NULL, -- Private Key (RSA/X509)
        "attributes"    TEXT DEFAULT NULL, -- Attributes (JSON)
        "comment"       TEXT DEFAULT NULL -- Comment
    );
    CREATE TABLE IF NOT EXISTS "groups" (
        "id"            INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

        `flags`         INT(11) DEFAULT 0, -- Flags
        `created`       INT(11) DEFAULT NULL, -- Created at
        `not_before`    INT(11) DEFAULT NULL, -- Not Before
        `not_after`     INT(11) DEFAULT NULL, -- Not After
        `public_key`    TEXT DEFAULT NULL, -- Public Key (RSA/X509)
        `private_key`   TEXT DEFAULT NULL, -- Private Key (RSA/X509)
        `attributes`    TEXT DEFAULT NULL, -- Attributes (JSON)
        `comment`       TEXT DEFAULT NULL, -- Comment
        PRIMARY KEY (`id`),
        UNIQUE KEY `username` (`username`)
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

        flags       => 0,
        created     => time(),
        not_before  => time(),
        not_after   => undef,
        public_key  => "",
        private_key => "",
        attributes  => qq/{"disabled": 0}/,
        comment     => "This user added by default",
    ) or die($model->error);

Add new user recored

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

        role        => "System administrator",
        flags       => 0,
        not_before  => time(),
        not_after   => undef,
        public_key  => "",
        private_key => "",
        attributes  => qq/{"disabled": 0}/,
        comment     => "This user added by default",
    ) or die($model->error);

Update recored by username

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

=head2 user_setkeys

    $model->user_setkeys(
        id          => 123,
        public_key  => $public_key,
        private_key => $private_key,
    ) or die($model->error);

Sets keys to user's data

=head2 user_tokens

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN


# User DMLs
use constant DML_USER_ADD => <<'DML';
INSERT INTO `users`
    (`username`,`name`,`email`,`password`,`algorithm`,`role`,`flags`,`created`,
     `not_before`,`not_after`,`public_key`,`private_key`,`attributes`,`comment`
    )
VALUES
    (?,?,?,?,?,?,?,?,?,?,?,?,?,?)
DML
use constant DML_USER_GET => <<'DML';
SELECT `id`,`username`,`name`,`email`,`password`,`algorithm`,`role`,`flags`,`created`,
       `not_before`,`not_after`,`public_key`,`private_key`,`attributes`,`comment`
FROM `users`
WHERE `username` = ?
DML
use constant DML_USER_SET => <<'DML';
UPDATE `users`
SET `name` = ?, `email` = ?, `password` = ?, `algorithm` = ?, `role` = ?, `flags` = ?,
    `not_before` = ?, `not_after` = ?, `public_key` = ?, `private_key` = ?,
    `attributes` = ?, `comment` = ?
WHERE `username` = ?
DML
use constant DML_USER_DEL => <<'DML';
DELETE FROM `users` WHERE `username` = ?
DML
use constant DML_USER_GETALL => <<'DML';
SELECT `id`,`username`,`name`,`email`,`password`,`algorithm`,`role`,`flags`,`created`,
       `not_before`,`not_after`,`public_key`,`private_key`,`attributes`,`comment`
FROM `users`
ORDER BY `username` ASC
DML
use constant DML_PASSWD => <<'DML';
UPDATE `users`

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

SET `name` = ?, `email` = ?, `role` = ?, `comment` = ?
WHERE `id` = ?
DML
use constant DML_USER_SETKEYS => <<'DML';
UPDATE `users`
SET `public_key` = ?, `private_key` = ?
WHERE `id` = ?
DML

# Group DMLs
use constant DML_GROUP_ADD => <<'DML';

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

    # Add
    $self->query(DML_USER_ADD,
        $data{username}, $data{name}, $data{email}, $data{password},
        uc($data{algorithm} || DEFAULT_ALGORITHM), $data{role}, $data{flags},
        $data{created} || time(), $data{not_before} || time(), $data{not_after},
        $data{public_key}, $data{private_key}, $data{attributes},
        $data{comment},
    ) or return 0;

    # Ok
    return 1;

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

    # Set
    $self->query(DML_USER_SET,
        $data{name}, $data{email}, $data{password},
        uc($data{algorithm} || DEFAULT_ALGORITHM), $data{role}, $data{flags},
        $data{not_before} || time(), $data{not_after},
        $data{public_key}, $data{private_key}, $data{attributes},
        $data{comment},
        $data{username},
    ) or return 0;

    # Ok

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

        $self->error("No id of user specified");
        return 0;
    }

    # Set
    $self->query(DML_USER_SETKEYS, $data{public_key}, $data{private_key}, $data{id}) or return 0;

    # Ok
    return 1;
}

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

    "flags"         INTEGER DEFAULT 0, -- Flags
    "created"       INTEGER DEFAULT NULL, -- Created at
    "not_before"    INTEGER DEFAULT NULL, -- Not Before
    "not_after"     INTEGER DEFAULT NULL, -- Not After
    "public_key"    TEXT DEFAULT NULL, -- Public Key (RSA/X509)
    "private_key"   TEXT DEFAULT NULL, -- Private Key (RSA/X509)
    "attributes"    TEXT DEFAULT NULL, -- Attributes (JSON)
    "comment"       TEXT DEFAULT NULL -- Comment
) ;
CREATE TABLE IF NOT EXISTS "groups" (
    "id"            INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE,

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

    `flags`         INT(11) DEFAULT 0, -- Flags
    `created`       INT(11) DEFAULT NULL, -- Created at
    `not_before`    INT(11) DEFAULT NULL, -- Not Before
    `not_after`     INT(11) DEFAULT NULL, -- Not After
    `public_key`    TEXT DEFAULT NULL, -- Public Key (RSA/X509)
    `private_key`   TEXT DEFAULT NULL, -- Private Key (RSA/X509)
    `attributes`    TEXT DEFAULT NULL, -- Attributes (JSON)
    `comment`       TEXT DEFAULT NULL, -- Comment
    PRIMARY KEY (`id`),
    UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

lib/WWW/Suffit/AuthDB/Model.pm  view on Meta::CPAN

    flags         INT DEFAULT 0, -- Flags
    created       INT DEFAULT NULL, -- Created at
    not_before    INT DEFAULT NULL, -- Not Before
    not_after     INT DEFAULT NULL, -- Not After
    public_key    TEXT DEFAULT NULL, -- Public Key (RSA/X509)
    private_key   TEXT DEFAULT NULL, -- Private Key (RSA/X509)
    attributes    TEXT DEFAULT NULL, -- Attributes (JSON)
    comment       TEXT DEFAULT NULL, -- Comment
    PRIMARY KEY (id),
    CONSTRAINT username UNIQUE (username)
) ;

 view all matches for this distribution


WWW-Suffit-Server

 view release on metacpan or  search on metacpan

lib/WWW/Suffit/Server.pm  view on Meta::CPAN

        no_daemonize => 1,

        # Security
        mysecret => 'Eph9Ce$quo.p2@oW3',
        rsa_keysize => 2048,
        private_key => undef, # Auto
        public_key => undef, # Auto

        # Initialization options
        all_features    => 'no',
        config_opts     => {

lib/WWW/Suffit/Server.pm  view on Meta::CPAN


The project name. For example: MyApp

Default: current class name

=head2 private_key

    private_key => '...'

Private RSA key

=head2 project_version

lib/WWW/Suffit/Server.pm  view on Meta::CPAN

    my %keysdata = $app->gen_rsakeys;
    my %keysdata = $app->gen_rsakeys( 2048 );

This helper generates RSA keys pair and returns structure as hash:

    private_key => '...',
    public_key  => '...',
    key_size    => 2048,
    error       => '...',

=head2 jwt

lib/WWW/Suffit/Server.pm  view on Meta::CPAN

has 'loglevel' => 'warn';   # warn
has 'max_history_size' => MAX_HISTORY_SIZE;

# Security
has 'mysecret' => DEFAULT_SECRET; # Secret
has 'private_key' => '';    # Private RSA key
has 'public_key' => '';     # Public RSA key
has 'rsa_keysize' => sub { shift->conf->latest("/rsa_keysize") };
has 'trustedproxies' => sub { [grep {length} @{(shift->conf->list("/trustedproxy"))}] };

# Prefork

lib/WWW/Suffit/Server.pm  view on Meta::CPAN

    $self->mysecret($self->conf->latest("/secret")) if $self->conf->latest("/secret");
    $self->secrets([$self->mysecret]);

    # Init RSA keys (optional)
    if ($all_features || is_true_flag($opts->{init_rsa_keys} // $self->init_rsa_keys)) {
        my $private_key_file = $self->conf->latest("/privatekeyfile") || path($self->datadir, PRIVATEKEYFILE)->to_string;
        my $public_key_file = $self->conf->latest("/publickeyfile") || path($self->datadir, PUBLICKEYFILE)->to_string;
        if ((!-r $private_key_file) and (!-r $public_key_file)) {
            my $rsa = WWW::Suffit::RSA->new();
            $rsa->key_size($self->rsa_keysize) if $self->rsa_keysize;
            $rsa->keygen;
            path($private_key_file)->spew($rsa->private_key)->chmod(0600);
            $self->private_key($rsa->private_key);
            path($public_key_file)->spew($rsa->public_key)->chmod(0644);
            $self->public_key($rsa->public_key);
        } elsif (!-r $private_key_file) {
            $self->raise("Can't read RSA private key file: \"%s\"", $private_key_file);
        } elsif (!-r $public_key_file) {
            $self->raise("Can't read RSA public key file: \"%s\"", $public_key_file);
        } else {
            $self->private_key(path($private_key_file)->slurp);
            $self->public_key(path($public_key_file)->slurp)
        }
    }

    # Init AuthDB plugin (optional)

lib/WWW/Suffit/Server.pm  view on Meta::CPAN

}
sub _getJWT {
    my $self = shift;
    return WWW::Suffit::JWT->new(
        secret      => $self->app->mysecret,
        private_key => $self->app->private_key,
        public_key  => $self->app->public_key,
    );
}
sub _genCacheKey {
    my $self = shift;

lib/WWW/Suffit/Server.pm  view on Meta::CPAN

    my $self = shift;
    my $key_size = shift || $self->app->rsa_keysize;
    my $rsa = WWW::Suffit::RSA->new();
       $rsa->key_size($key_size) if $key_size;
       $rsa->keygen;
    my ($private_key, $public_key) = ($rsa->private_key // '', $rsa->public_key // '');
    return (
        private_key => $private_key,
        public_key  => $public_key,
        key_size    => $rsa->key_size,
        error       => $rsa->error
            ? sprintf("Error occurred while generation %s bit RSA keys: %s",  $rsa->key_size // '?', $rsa->error)
            : '',

 view all matches for this distribution


WWW-Suffit-UserAgent

 view release on metacpan or  search on metacpan

lib/WWW/Suffit/UserAgent.pm  view on Meta::CPAN

    my $url_str = $client->path2url("/foo/bar", 1);
        # http://localhost:8695/foo/bar

Sets path to url

=head2 private_key

    $clinet = $clinet->private_key("---- BEGIN ... END -----");
    my $private_key = $client->private_key;

Sets or returns RSA private key

=head2 public_key

lib/WWW/Suffit/UserAgent.pm  view on Meta::CPAN

    $args{token} //= "";
    $args{token_name} ||= TOKEN_HEADER_NAME;

    # Security
    $args{public_key} //= "";
    $args{private_key} //= "";

    # Proxy string
    $args{proxy} //= "";

    # Transaction (tx)

lib/WWW/Suffit/UserAgent.pm  view on Meta::CPAN

        $self->{public_key} = $k;
        return $self;
    }
    return $self->{public_key};
}
sub private_key {
    my $self = shift;
    my $k = shift;
    if (defined $k) {
        $self->{private_key} = $k;
        return $self;
    }
    return $self->{private_key};
}
sub proxy {
    my $self = shift;
    my $p = shift;
    return $self->{proxy} unless defined $p;

 view all matches for this distribution


WWW-Suffit

 view release on metacpan or  search on metacpan

lib/WWW/Suffit/JWT.pm  view on Meta::CPAN

    die $jwt->error if $jwt->error;

    use WWW::Suffit::RSA;
    my $rsa = WWW::Suffit::RSA->new(key_size => 1024);
    $rsa->keygen;
    my $private_key = $rsa->private_key;
    my $public_key = $rsa->public_key;
    my $jwt = WWW::Suffit::JWT->new(
        private_key => $private_key,
        payload => {foo => 'bar'},
        algorithm => 'RS512',
    );
    my $token = $jwt->encode->token or die $jwt->error;
    my $payload = $jwt->public_key($public_key)->decode($token)->payload;

lib/WWW/Suffit/JWT.pm  view on Meta::CPAN


Payload - second part of JWT structure

The payload is a user data structure to be encoded. This must be a hash reference only.

=head2 private_key

The RSA private key to be used in edcoding an asymmetrically signed JWT. See L<WWW::Suffit::RSA>

=head2 public_key

lib/WWW/Suffit/JWT.pm  view on Meta::CPAN

=head2 sign_rsa

    my $signature = $jwt->sign_rsa($size, $string);

Returns the RSA signature for the given size and string.
The L</private_key> attribute is used as the private key.
The result is base64url encoded!
This method is provided mostly for the purposes of subclassing.

=head2 verify_hmac

lib/WWW/Suffit/JWT.pm  view on Meta::CPAN

has 'algorithm' => DEFAULT_ALGORITHM(); # By default
has 'expires'; # Expire time
has 'not_before'; # Time "not before"
has 'iat' => 0; # Payload iat param
has 'jti' => 0; # Payload jti param
has 'private_key'; # For RSA
has 'public_key'; # For RSA
has 'error' => ''; # Error string
has 'header' => sub { {} }; # Header (first part of JWT)
has 'payload' => sub { {} }; # Payload (second parg of JWT)

lib/WWW/Suffit/JWT.pm  view on Meta::CPAN

}
sub sign_rsa {
    my ($self, $size, $concat) = @_;

    # Get RSA private key
    my $private_key = $self->private_key;
    $self->error('Private key (private_key) not specified') && return unless $private_key;

    # Create RSA object
    my $rsa = WWW::Suffit::RSA->new(private_key => $private_key);

    # Sign!
    my $sign = $rsa->sign($concat, $size) // '';
    unless (length($sign)) {
        $self->error($rsa->error);

 view all matches for this distribution


Weather-WeatherKit

 view release on metacpan or  search on metacpan

lib/Weather/WeatherKit.pm  view on Meta::CPAN


    my $wk = Weather::WeatherKit->new(
        team_id    => $apple_team_id,          # Apple Developer Team Id
        service_id => $weatherkit_service_id,  # WeatherKit Service Id
        key_id     => $key_id,                 # WeatherKit developer key ID
        key        => $private_key             # Encrypted private key (PEM)
    );
    
    # Request current weather:
    my $report = $wk->get(
        lat      => $lat,      # Latitude

lib/Weather/WeatherKit.pm  view on Meta::CPAN


    my $wk = Weather::WeatherKit->new(
        team_id    => "MLU84X58U4",
        service_id => "com.domain.myweatherapp",
        key_id     => $key_id,
        key        => $private_key?,
        key_file   => $private_key_pem?,
        language   => $lang_code?,
        timeout    => $timeout_sec?,
        expiration => $expire_secs?,
        ua         => $lwp_ua?,
        curl       => $use_curl?

 view all matches for this distribution


WebService-Braintree

 view release on metacpan or  search on metacpan

lib/WebService/Braintree.pm  view on Meta::CPAN


    my $conf = WebService::Braintree->configuration;
    $conf->environment( 'sandbox' );
    $conf->merchant_id( 'use_your_merchant_id' );
    $conf->public_key( 'use_your_public_key' );
    $conf->private_key( 'use_your_private_key' );

    my $result = WebService::Braintree::Transaction->sale(
        ...
    );

lib/WebService/Braintree.pm  view on Meta::CPAN


    my $gateway = WebService::Braintree::Gateway->new({
        environment => 'sandbox',
        merchant_id => 'use_your_merchant_id',
        public_key  => 'use_your_public_key',
        private_key => 'use_your_private_key',
    });

    my $result = $gateway->transaction->sale(
        ...
    );

lib/WebService/Braintree.pm  view on Meta::CPAN

be:

    {
      "merchant_id": "<< value 1 >>",
      "public_key": "<< value 2 >>",
      "private_key": "<< value 3 >>"
    }

replacing what's in the double-quotes with the appropriate values from your
Braintree sandbox's dashboard.

 view all matches for this distribution


WebService-Cryptsy

 view release on metacpan or  search on metacpan

examples/api.pl  view on Meta::CPAN

use WebService::Cryptsy;
use lib qw(lib  ../lib);

my $cryp = WebService::Cryptsy->new(
    public_key => 'YOUR PUBLIC KEY',
    private_key => 'YOUR PRIVATE KEY',
);

my $market_data = $cryp->marketdatav2
    or die "Error fetching data: " . $cryp->error;

 view all matches for this distribution


WebService-Fastly

 view release on metacpan or  search on metacpan

lib/WebService/Fastly/LoggingBigqueryApi.pm  view on Meta::CPAN

# @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with &#x60;format_version&#x60; of 2 are placed in &#x60;vcl_log&#x60; and those with &#x60;format_version&#x60; of 1 are placed in &#x60;v...
# @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
# @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional)
# @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60...
# @param string $user Your Google Cloud Platform service account email address. The &#x60;client_email&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified. (optional)
# @param string $secret_key Your Google Cloud Platform account secret key. The &#x60;private_key&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified. (optional)
# @param string $account_name The name of the Google Cloud Platform service account associated with the target log collection service. Not required if &#x60;user&#x60; and &#x60;secret_key&#x60; are provided. (optional)
# @param string $dataset Your BigQuery dataset. (optional)
# @param string $table Your BigQuery table. (optional)
# @param string $template_suffix BigQuery table name suffix template. Optional. (optional)
# @param string $project_id Your Google Cloud Platform project ID. Required (optional)

lib/WebService/Fastly/LoggingBigqueryApi.pm  view on Meta::CPAN

        description => 'Your Google Cloud Platform service account email address. The &#x60;client_email&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified.',
        required => '0',
    },
    'secret_key' => {
        data_type => 'string',
        description => 'Your Google Cloud Platform account secret key. The &#x60;private_key&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified.',
        required => '0',
    },
    'account_name' => {
        data_type => 'string',
        description => 'The name of the Google Cloud Platform service account associated with the target log collection service. Not required if &#x60;user&#x60; and &#x60;secret_key&#x60; are provided.',

lib/WebService/Fastly/LoggingBigqueryApi.pm  view on Meta::CPAN

# @param string $placement Where in the generated VCL the logging call should be placed. If not set, endpoints with &#x60;format_version&#x60; of 2 are placed in &#x60;vcl_log&#x60; and those with &#x60;format_version&#x60; of 1 are placed in &#x60;v...
# @param string $response_condition The name of an existing condition in the configured endpoint, or leave blank to always execute. (optional)
# @param string $format A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce JSON that matches the schema of your BigQuery table. (optional)
# @param int $format_version The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in &#x60;vcl_log&#x60; if &#x60;format_version&#x60; is set to &#x60;2&#x60; and in &#x60;vcl_deliver&#x60...
# @param string $user Your Google Cloud Platform service account email address. The &#x60;client_email&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified. (optional)
# @param string $secret_key Your Google Cloud Platform account secret key. The &#x60;private_key&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified. (optional)
# @param string $account_name The name of the Google Cloud Platform service account associated with the target log collection service. Not required if &#x60;user&#x60; and &#x60;secret_key&#x60; are provided. (optional)
# @param string $dataset Your BigQuery dataset. (optional)
# @param string $table Your BigQuery table. (optional)
# @param string $template_suffix BigQuery table name suffix template. Optional. (optional)
# @param string $project_id Your Google Cloud Platform project ID. Required (optional)

lib/WebService/Fastly/LoggingBigqueryApi.pm  view on Meta::CPAN

        description => 'Your Google Cloud Platform service account email address. The &#x60;client_email&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified.',
        required => '0',
    },
    'secret_key' => {
        data_type => 'string',
        description => 'Your Google Cloud Platform account secret key. The &#x60;private_key&#x60; field in your service account authentication JSON. Not required if &#x60;account_name&#x60; is specified.',
        required => '0',
    },
    'account_name' => {
        data_type => 'string',
        description => 'The name of the Google Cloud Platform service account associated with the target log collection service. Not required if &#x60;user&#x60; and &#x60;secret_key&#x60; are provided.',

 view all matches for this distribution


WebService-MyGengo

 view release on metacpan or  search on metacpan

lib/WebService/MyGengo/Client.pm  view on Meta::CPAN

=head1 SYNOPSIS

    use WebService::MyGengo::Client;
    my $client = WebService::MyGengo::Client->new({
        public_key      => 'pubkey'
        , private_key   => 'privkey'
        , use_sandbox   => 1
        });

    # Alternative constructor syntax
    $client = WebService::MyGengo::Client->new('pubkey', 'privkey', $use_sandbox);

lib/WebService/MyGengo/Client.pm  view on Meta::CPAN

    , isa => 'Str'
    , required => 1
    , trigger => sub { shift->clear_request_factory }
    );

=head2 private_key (Str)

Your private API key.

=cut
has private_key => (
    is => 'ro'
    , isa => 'Str'
    , required => 1
    , trigger => sub { shift->clear_request_factory }
    );

lib/WebService/MyGengo/Client.pm  view on Meta::CPAN

sub _build_request_factory {
    my ( $self ) = ( shift );

    return WebService::MyGengo::RequestFactory->new({
        public_key      => $self->public_key
        , private_key   => $self->private_key
        , root_uri      => $self->root_uri
        });
}

=head2 last_response (L<WebService::MyGengo::Response>)

lib/WebService/MyGengo/Client.pm  view on Meta::CPAN

    my ( $orig, $class, $args ) = ( shift, shift, @_ );

    ref($args) eq 'HASH' and return $class->$orig(@_);

    my %args;
    @args{ qw/public_key private_key use_sandbox _user_agent_string/ }
        = @_;

    return \%args;
};

 view all matches for this distribution


WebService-NetSuite

 view release on metacpan or  search on metacpan

lib/WebService/NetSuite.pm  view on Meta::CPAN

has 'debug'           => ( is => 'rw', trigger => \&setDebug );
has 'debugfile'       => ( is => 'rw', trigger => \&setDebugFile,
                           default => 'NetSuite.dbg' );
has 'time'            => ( is => 'rw' );
has 'company'         => ( is => 'ro' );
has 'rsa_private_key' => ( is => 'ro' );
has 'nsemail'         => ( is => 'ro', required => 1 );
has 'nspassword'      => ( is => 'ro', required => 1 );
has 'nsrole'          => ( is => 'ro', writer   => '_set_nsrole' );
has 'nsaccount'       => ( is => 'ro', writer   => '_set_nsaccount' );
has 'nsroleName'      => ( is => 'ro', writer   => '_set_nsroleName' );

lib/WebService/NetSuite.pm  view on Meta::CPAN

sub _generate_auth_token {
    my ( $self, $user_id ) = @_;

    #$DB::single = 1;
    my $rsa_priv =
      Crypt::OpenSSL::RSA->new_private_key( $self->rsa_private_key );
    $rsa_priv->use_pkcs1_padding;

    # number of milliseconds since the epoch
    my $super_epoch = time() * 1000;

 view all matches for this distribution


WebService-TeamCity

 view release on metacpan or  search on metacpan

t/fixtures/testOccurrences/id:711,build:(id:667885).json  view on Meta::CPAN

   },
   "details" : "",
   "duration" : 1,
   "href" : "/httpAuth/app/rest/testOccurrences/id:711,build:(id:667885)",
   "id" : "id:711,build:(id:667885)",
   "name" : "Git Suite: jetbrains.buildServer.buildTriggers.vcs.git.tests.GitUrlSupportTest.should_not_use_private_key_for_local_repository",
   "status" : "SUCCESS",
   "test" : {
      "href" : "/httpAuth/app/rest/tests/id:-1899830473340440401",
      "id" : -1899830473340440401,
      "name" : "Git Suite: jetbrains.buildServer.buildTriggers.vcs.git.tests.GitUrlSupportTest.should_not_use_private_key_for_local_repository"
   }
}

 view all matches for this distribution


WebService-Xero

 view release on metacpan or  search on metacpan

lib/WebService/Xero/Agent/PrivateApplication.pm  view on Meta::CPAN

  return $self->_error('CONSUMER_SECRET not valid')  unless ( $self->{CONSUMER_SECRET} =~ /.{20,}/m ); ## min 20 chars - 30 is typical
   #     KEYFILE 
   #     PRIVATE_KEY
  if ( not defined $self->{pko} and $self->{PRIVATE_KEY} =~ /BEGIN RSA PRIVATE KEY/smg )
  {
    $self->{pko} = Crypt::OpenSSL::RSA->new_private_key(  $self->{PRIVATE_KEY} ) || return $self->_error('PRIVATE_KEY not valid'); 
    ## TODO - sort out catching error - currently crashes if fails not return undef
    ##  could try to catch the error .. eg. RSA.xs:178: OpenSSL error: too long
    ## FROM Crypt::OpenSSL::RSA docs
#       NOTE: Many of the methods in this package can croak, so use eval, or
#       Error.pm's try/catch mechanism to capture errors.  Also, while some

 view all matches for this distribution


Win32-Vcpkg

 view release on metacpan or  search on metacpan

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/EC_KEY_dup.html
x64-windows/debug/html/man3/EC_KEY_free.html
x64-windows/debug/html/man3/EC_KEY_generate_key.html
x64-windows/debug/html/man3/EC_KEY_get0_engine.html
x64-windows/debug/html/man3/EC_KEY_get0_group.html
x64-windows/debug/html/man3/EC_KEY_get0_private_key.html
x64-windows/debug/html/man3/EC_KEY_get0_public_key.html
x64-windows/debug/html/man3/EC_KEY_get_conv_form.html
x64-windows/debug/html/man3/EC_KEY_get_enc_flags.html
x64-windows/debug/html/man3/EC_KEY_get_ex_data.html
x64-windows/debug/html/man3/EC_KEY_get_ex_new_index.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/EC_KEY_set_enc_flags.html
x64-windows/debug/html/man3/EC_KEY_set_ex_data.html
x64-windows/debug/html/man3/EC_KEY_set_flags.html
x64-windows/debug/html/man3/EC_KEY_set_group.html
x64-windows/debug/html/man3/EC_KEY_set_method.html
x64-windows/debug/html/man3/EC_KEY_set_private_key.html
x64-windows/debug/html/man3/EC_KEY_set_public_key.html
x64-windows/debug/html/man3/EC_KEY_set_public_key_affine_coordinates.html
x64-windows/debug/html/man3/EC_KEY_up_ref.html
x64-windows/debug/html/man3/EC_METHOD_get_field_type.html
x64-windows/debug/html/man3/EC_POINT_add.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/ENGINE_get_next.html
x64-windows/debug/html/man3/ENGINE_get_prev.html
x64-windows/debug/html/man3/ENGINE_get_table_flags.html
x64-windows/debug/html/man3/ENGINE_init.html
x64-windows/debug/html/man3/ENGINE_load_builtin_engines.html
x64-windows/debug/html/man3/ENGINE_load_private_key.html
x64-windows/debug/html/man3/ENGINE_load_public_key.html
x64-windows/debug/html/man3/ENGINE_new.html
x64-windows/debug/html/man3/ENGINE_register_DH.html
x64-windows/debug/html/man3/ENGINE_register_DSA.html
x64-windows/debug/html/man3/ENGINE_register_RAND.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/EVP_PKEY_get1_DH.html
x64-windows/debug/html/man3/EVP_PKEY_get1_DSA.html
x64-windows/debug/html/man3/EVP_PKEY_get1_EC_KEY.html
x64-windows/debug/html/man3/EVP_PKEY_get1_RSA.html
x64-windows/debug/html/man3/EVP_PKEY_get_default_digest_nid.html
x64-windows/debug/html/man3/EVP_PKEY_get_raw_private_key.html
x64-windows/debug/html/man3/EVP_PKEY_get_raw_public_key.html
x64-windows/debug/html/man3/EVP_PKEY_id.html
x64-windows/debug/html/man3/EVP_PKEY_keygen.html
x64-windows/debug/html/man3/EVP_PKEY_keygen_init.html
x64-windows/debug/html/man3/EVP_PKEY_meth_add0.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/EVP_PKEY_meth_set_verifyctx.html
x64-windows/debug/html/man3/EVP_PKEY_missing_parameters.html
x64-windows/debug/html/man3/EVP_PKEY_new.html
x64-windows/debug/html/man3/EVP_PKEY_new_CMAC_key.html
x64-windows/debug/html/man3/EVP_PKEY_new_mac_key.html
x64-windows/debug/html/man3/EVP_PKEY_new_raw_private_key.html
x64-windows/debug/html/man3/EVP_PKEY_new_raw_public_key.html
x64-windows/debug/html/man3/EVP_PKEY_param_check.html
x64-windows/debug/html/man3/EVP_PKEY_paramgen.html
x64-windows/debug/html/man3/EVP_PKEY_paramgen_init.html
x64-windows/debug/html/man3/EVP_PKEY_print_params.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/SSL_CTX_add_extra_chain_cert.html
x64-windows/debug/html/man3/SSL_CTX_add_server_custom_ext.html
x64-windows/debug/html/man3/SSL_CTX_add_session.html
x64-windows/debug/html/man3/SSL_CTX_build_cert_chain.html
x64-windows/debug/html/man3/SSL_CTX_callback_ctrl.html
x64-windows/debug/html/man3/SSL_CTX_check_private_key.html
x64-windows/debug/html/man3/SSL_CTX_clear_chain_certs.html
x64-windows/debug/html/man3/SSL_CTX_clear_extra_chain_certs.html
x64-windows/debug/html/man3/SSL_CTX_clear_mode.html
x64-windows/debug/html/man3/SSL_CTX_clear_options.html
x64-windows/debug/html/man3/SSL_CTX_config.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/SSL_allow_early_data_cb_fn.html
x64-windows/debug/html/man3/SSL_build_cert_chain.html
x64-windows/debug/html/man3/SSL_bytes_to_cipher_list.html
x64-windows/debug/html/man3/SSL_callback_ctrl.html
x64-windows/debug/html/man3/SSL_check_chain.html
x64-windows/debug/html/man3/SSL_check_private_key.html
x64-windows/debug/html/man3/SSL_clear.html
x64-windows/debug/html/man3/SSL_clear_chain_certs.html
x64-windows/debug/html/man3/SSL_clear_mode.html
x64-windows/debug/html/man3/SSL_clear_options.html
x64-windows/debug/html/man3/SSL_client_hello_cb_fn.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/X509_PUBKEY_new.html
x64-windows/debug/html/man3/X509_PUBKEY_set.html
x64-windows/debug/html/man3/X509_PUBKEY_set0_param.html
x64-windows/debug/html/man3/X509_REQ_INFO_free.html
x64-windows/debug/html/man3/X509_REQ_INFO_new.html
x64-windows/debug/html/man3/X509_REQ_check_private_key.html
x64-windows/debug/html/man3/X509_REQ_digest.html
x64-windows/debug/html/man3/X509_REQ_dup.html
x64-windows/debug/html/man3/X509_REQ_free.html
x64-windows/debug/html/man3/X509_REQ_get0_pubkey.html
x64-windows/debug/html/man3/X509_REQ_get0_signature.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/debug/html/man3/X509_check_email.html
x64-windows/debug/html/man3/X509_check_host.html
x64-windows/debug/html/man3/X509_check_ip.html
x64-windows/debug/html/man3/X509_check_ip_asc.html
x64-windows/debug/html/man3/X509_check_issued.html
x64-windows/debug/html/man3/X509_check_private_key.html
x64-windows/debug/html/man3/X509_cmp.html
x64-windows/debug/html/man3/X509_cmp_current_time.html
x64-windows/debug/html/man3/X509_cmp_time.html
x64-windows/debug/html/man3/X509_delete_ext.html
x64-windows/debug/html/man3/X509_digest.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/EC_KEY_dup.html
x64-windows/html/man3/EC_KEY_free.html
x64-windows/html/man3/EC_KEY_generate_key.html
x64-windows/html/man3/EC_KEY_get0_engine.html
x64-windows/html/man3/EC_KEY_get0_group.html
x64-windows/html/man3/EC_KEY_get0_private_key.html
x64-windows/html/man3/EC_KEY_get0_public_key.html
x64-windows/html/man3/EC_KEY_get_conv_form.html
x64-windows/html/man3/EC_KEY_get_enc_flags.html
x64-windows/html/man3/EC_KEY_get_ex_data.html
x64-windows/html/man3/EC_KEY_get_ex_new_index.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/EC_KEY_set_enc_flags.html
x64-windows/html/man3/EC_KEY_set_ex_data.html
x64-windows/html/man3/EC_KEY_set_flags.html
x64-windows/html/man3/EC_KEY_set_group.html
x64-windows/html/man3/EC_KEY_set_method.html
x64-windows/html/man3/EC_KEY_set_private_key.html
x64-windows/html/man3/EC_KEY_set_public_key.html
x64-windows/html/man3/EC_KEY_set_public_key_affine_coordinates.html
x64-windows/html/man3/EC_KEY_up_ref.html
x64-windows/html/man3/EC_METHOD_get_field_type.html
x64-windows/html/man3/EC_POINT_add.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/ENGINE_get_next.html
x64-windows/html/man3/ENGINE_get_prev.html
x64-windows/html/man3/ENGINE_get_table_flags.html
x64-windows/html/man3/ENGINE_init.html
x64-windows/html/man3/ENGINE_load_builtin_engines.html
x64-windows/html/man3/ENGINE_load_private_key.html
x64-windows/html/man3/ENGINE_load_public_key.html
x64-windows/html/man3/ENGINE_new.html
x64-windows/html/man3/ENGINE_register_DH.html
x64-windows/html/man3/ENGINE_register_DSA.html
x64-windows/html/man3/ENGINE_register_RAND.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/EVP_PKEY_get1_DH.html
x64-windows/html/man3/EVP_PKEY_get1_DSA.html
x64-windows/html/man3/EVP_PKEY_get1_EC_KEY.html
x64-windows/html/man3/EVP_PKEY_get1_RSA.html
x64-windows/html/man3/EVP_PKEY_get_default_digest_nid.html
x64-windows/html/man3/EVP_PKEY_get_raw_private_key.html
x64-windows/html/man3/EVP_PKEY_get_raw_public_key.html
x64-windows/html/man3/EVP_PKEY_id.html
x64-windows/html/man3/EVP_PKEY_keygen.html
x64-windows/html/man3/EVP_PKEY_keygen_init.html
x64-windows/html/man3/EVP_PKEY_meth_add0.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/EVP_PKEY_meth_set_verifyctx.html
x64-windows/html/man3/EVP_PKEY_missing_parameters.html
x64-windows/html/man3/EVP_PKEY_new.html
x64-windows/html/man3/EVP_PKEY_new_CMAC_key.html
x64-windows/html/man3/EVP_PKEY_new_mac_key.html
x64-windows/html/man3/EVP_PKEY_new_raw_private_key.html
x64-windows/html/man3/EVP_PKEY_new_raw_public_key.html
x64-windows/html/man3/EVP_PKEY_param_check.html
x64-windows/html/man3/EVP_PKEY_paramgen.html
x64-windows/html/man3/EVP_PKEY_paramgen_init.html
x64-windows/html/man3/EVP_PKEY_print_params.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/SSL_CTX_add_extra_chain_cert.html
x64-windows/html/man3/SSL_CTX_add_server_custom_ext.html
x64-windows/html/man3/SSL_CTX_add_session.html
x64-windows/html/man3/SSL_CTX_build_cert_chain.html
x64-windows/html/man3/SSL_CTX_callback_ctrl.html
x64-windows/html/man3/SSL_CTX_check_private_key.html
x64-windows/html/man3/SSL_CTX_clear_chain_certs.html
x64-windows/html/man3/SSL_CTX_clear_extra_chain_certs.html
x64-windows/html/man3/SSL_CTX_clear_mode.html
x64-windows/html/man3/SSL_CTX_clear_options.html
x64-windows/html/man3/SSL_CTX_config.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/SSL_allow_early_data_cb_fn.html
x64-windows/html/man3/SSL_build_cert_chain.html
x64-windows/html/man3/SSL_bytes_to_cipher_list.html
x64-windows/html/man3/SSL_callback_ctrl.html
x64-windows/html/man3/SSL_check_chain.html
x64-windows/html/man3/SSL_check_private_key.html
x64-windows/html/man3/SSL_clear.html
x64-windows/html/man3/SSL_clear_chain_certs.html
x64-windows/html/man3/SSL_clear_mode.html
x64-windows/html/man3/SSL_clear_options.html
x64-windows/html/man3/SSL_client_hello_cb_fn.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/X509_PUBKEY_new.html
x64-windows/html/man3/X509_PUBKEY_set.html
x64-windows/html/man3/X509_PUBKEY_set0_param.html
x64-windows/html/man3/X509_REQ_INFO_free.html
x64-windows/html/man3/X509_REQ_INFO_new.html
x64-windows/html/man3/X509_REQ_check_private_key.html
x64-windows/html/man3/X509_REQ_digest.html
x64-windows/html/man3/X509_REQ_dup.html
x64-windows/html/man3/X509_REQ_free.html
x64-windows/html/man3/X509_REQ_get0_pubkey.html
x64-windows/html/man3/X509_REQ_get0_signature.html

corpus/root2/installed/vcpkg/info/openssl-windows_1.1.1d-1_x64-windows.list  view on Meta::CPAN

x64-windows/html/man3/X509_check_email.html
x64-windows/html/man3/X509_check_host.html
x64-windows/html/man3/X509_check_ip.html
x64-windows/html/man3/X509_check_ip_asc.html
x64-windows/html/man3/X509_check_issued.html
x64-windows/html/man3/X509_check_private_key.html
x64-windows/html/man3/X509_cmp.html
x64-windows/html/man3/X509_cmp_current_time.html
x64-windows/html/man3/X509_cmp_time.html
x64-windows/html/man3/X509_delete_ext.html
x64-windows/html/man3/X509_digest.html

 view all matches for this distribution


Wireguard-WGmeta

 view release on metacpan or  search on metacpan

lib/Wireguard/WGmeta/Parser/Show.pm  view on Meta::CPAN

                'preshared-key' => <interface_preshared_key>,
                'and_so_on'     => <value_of_attr>
            },
            'an_interface_name => {
                'interface'     => <parent_interface>,
                'private-key'   => <interface_private_key>,
                'and_so_on'     => <value_of_attr>
            }
        },
        'an_other_interface' => {
            [...]

 view all matches for this distribution


XML-Compile-WSS-Signature

 view release on metacpan or  search on metacpan

lib/XML/Compile/WSS/Sign/RSA.pm  view on Meta::CPAN

sub init($)
{   my ($self, $args) = @_;
    $self->SUPER::init($args);

    $self->privateKey
      ( $args->{private_key}
      , hashing => $args->{hashing}
      , padding => $args->{padding}
      );
 
    $self->publicKey

lib/XML/Compile/WSS/Sign/RSA.pm  view on Meta::CPAN



sub toPrivateSHA($)
{   my ($self, $priv) = @_;

    return ($priv->get_private_key_string, $priv)
        if blessed $priv && $priv->isa('Crypt::OpenSSL::RSA');

    error __x"unsupported private key object `{object}'", object=>$priv
       if ref $priv =~ m/Crypt/;

    return ($priv, Crypt::OpenSSL::RSA->new_private_key($priv))
        if index($priv, "\n") >= 0;

    my $key = read_file $priv;
    my $rsa = eval { Crypt::OpenSSL::RSA->new_private_key($key) };
    if($@)
    {   error __x"cannot read private RSA key from {file}: {err}"
          , file => $priv, err => $@;
    }

lib/XML/Compile/WSS/Sign/RSA.pm  view on Meta::CPAN

# Do we need next 4?  Probably not

sub sign(@)
{   my ($self, $text) = @_;
    my $priv = $self->privateKeyRSA
        or error "signing rsa requires the private_key";

    $priv->sign($text);
}

sub encrypt(@)

lib/XML/Compile/WSS/Sign/RSA.pm  view on Meta::CPAN

}

sub decrypt(@)
{   my ($self, $text) = @_;
    my $priv = $self->privateKeyRSA
        or error "decrypting rsa requires the private_key";
    $priv->decrypt($text);
}


#XXX Unused?  See checker()

lib/XML/Compile/WSS/Sign/RSA.pm  view on Meta::CPAN

### above functions probably not needed.

sub builder()
{   my ($self) = @_;
    my $priv   = $self->privateKeyRSA
        or error "signing rsa requires the private_key";

    sub { $priv->sign($_[0]) };
}

sub checker()

 view all matches for this distribution


XML-Enc

 view release on metacpan or  search on metacpan

lib/XML/Enc.pm  view on Meta::CPAN

        require Crypt::OpenSSL::X509;
    };
    confess "Crypt::OpenSSL::X509 needs to be installed so that we
            can handle X509 Certificates." if $@;

    my $x509Key = Crypt::OpenSSL::X509->new_private_key( $key_text );

    if ( $x509Key ) {
        $x509Key->use_pkcs1_padding();
        $self->{ key_obj } = $x509Key;
        $self->{key_type} = 'x509';

 view all matches for this distribution


XML-Sig-OO

 view release on metacpan or  search on metacpan

exaples/sign_multi_keys.pl  view on Meta::CPAN


my $x=$s->build_xpath;

# sign our first xml chunk with our rsa key!
my $rsa_str=join '',IO::File->new(File::Spec->catfile($Bin,'x509_key.pem'))->getlines;
my $rsa=Crypt::OpenSSL::RSA->new_private_key($rsa_str);
$rsa->use_pkcs1_padding();
my $cert_str=join '',IO::File->new(File::Spec->catfile($Bin,'x509_cert.pem'))->getlines;
$s->sign_cert($rsa);
$s->key_type('rsa');
$s->cert_string($cert_str);

 view all matches for this distribution


XML-Sig

 view release on metacpan or  search on metacpan

lib/XML/Sig.pm  view on Meta::CPAN

    eval {
        require Crypt::OpenSSL::RSA;
    };
    confess "Crypt::OpenSSL::RSA needs to be installed so that we can handle RSA keys." if $@;

    my $rsaKey = Crypt::OpenSSL::RSA->new_private_key( $key_text );

    if ( $rsaKey ) {
        $rsaKey->use_pkcs1_oaep_padding();
        $self->{ key_obj }  = $rsaKey;
        $self->{ key_type } = 'rsa';

lib/XML/Sig.pm  view on Meta::CPAN

        require Crypt::OpenSSL::X509;
    };
    confess "Crypt::OpenSSL::X509 needs to be installed so that we
            can handle X509 Certificates." if $@;

    my $x509Key = Crypt::OpenSSL::X509->new_private_key( $key_text );

    if ( $x509Key ) {
        $x509Key->use_pkcs1_oaep_padding();
        $self->{ key_obj } = $x509Key;
        $self->{key_type} = 'x509';

 view all matches for this distribution


XS-libunievent

 view release on metacpan or  search on metacpan

libunievent/src/panda/unievent/ssl/SslFilter.cc  view on Meta::CPAN


SslFilter::SslFilter (Stream* stream, const SslContext &context, const SslFilterSP& server_filter)
        : StreamFilter(stream, TYPE, PRIORITY), state(State::initial), profile(Profile::UNKNOWN), server_filter(server_filter)
{
    panda_log_ctor();
    if (stream->listening() && !SSL_CTX_check_private_key(context)) throw Error("SSL certificate&key needed to listen()");
    #ifdef RENEGOTIATION_DISABLED
        SSL_CTX_set_options(context, SSL_OP_NO_RENEGOTIATION);
    #endif
    init(context);
}

libunievent/src/panda/unievent/ssl/SslFilter.cc  view on Meta::CPAN

    SSL_set_bio(raw_ssl, read_bio, write_bio);
    ssl = raw_ssl;
}

void SslFilter::listen () {
    if (!SSL_check_private_key(ssl)) throw Error("SSL certificate&key needed to listen()");
    NextFilter::listen();
}

void SslFilter::reset () {
    if (state == State::initial) return;

 view all matches for this distribution


ZMQ-Raw

 view release on metacpan or  search on metacpan

xs/Curve.xs  view on Meta::CPAN

keypair (class)
	SV *class

	PREINIT:
		int rc, ctx;
		SV *public_key, *private_key;

	PPCODE:
		ctx = GIMME_V;

		if (ctx == G_VOID)
			XSRETURN_EMPTY;

		public_key = sv_2mortal (newSV (41));
		private_key = sv_2mortal (newSV (41));
		SvPOK_on (public_key);
		SvPOK_on (private_key);
		SvCUR_set (public_key, 40);
		SvCUR_set (private_key, 40);

		rc = zmq_curve_keypair (SvPVX (public_key), SvPVX (private_key));
		zmq_raw_check_error (rc);

		XPUSHs (private_key);
		if (ctx == G_ARRAY)
		{
			XPUSHs (public_key);
			XSRETURN (2);
		}

		XSRETURN (1);

SV *
public (class, private_key)
	SV *class
	SV *private_key

	PREINIT:
		int rc;
		SV *public_key;

	CODE:
		if (SvCUR (private_key) != 40)
			croak_usage ("private_key should be 40 bytes");

		public_key = sv_2mortal (newSV (41));
		SvPOK_on (public_key);
		SvCUR_set (public_key, 40);

		rc = zmq_curve_public (SvPVX (public_key), SvPVX (private_key));
		zmq_raw_check_error (rc);

		SvREFCNT_inc (public_key);
		RETVAL = public_key;

 view all matches for this distribution


Zonemaster-LDNS

 view release on metacpan or  search on metacpan

ldns/host2str.c  view on Meta::CPAN

                                status=ldns_algorithm2buffer_str(output, (ldns_algorithm)ldns_key_algorithm(k));
#ifndef S_SPLINT_S
				ldns_buffer_printf(output, ")\n");
                                if(k->_key.key) {
                                        EC_KEY* ec = EVP_PKEY_get1_EC_KEY(k->_key.key);
                                        const BIGNUM* b = EC_KEY_get0_private_key(ec);
					if(!ldns_print_bignum_b64_line(output, "PrivateKey", b))
						goto error;
                                        /* down reference count in EC_KEY
                                         * its still assigned to the PKEY */
                                        EC_KEY_free(ec);

 view all matches for this distribution


Zoom-Meeting

 view release on metacpan or  search on metacpan

local/lib/perl5/x86_64-linux-thread/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


grpc-xs

 view release on metacpan or  search on metacpan

ext/channel_credentials.xs  view on Meta::CPAN

    if ( items % 2 ) {
      croak("Expecting a hash as input to channel credentials constructor");
    }

    // @param string pem_root_certs PEM encoding of the server root certificates
    // @param string pem_private_key PEM encoding of the client's private key
    //     (optional)
    // @param string pem_cert_chain PEM encoding of the client's certificate chain
    //     (optional)
    // @return ChannelCredentials The new SSL credentials object

    const char* pem_root_certs = NULL;

    grpc_ssl_pem_key_cert_pair pem_key_cert_pair;
    pem_key_cert_pair.private_key = pem_key_cert_pair.cert_chain = NULL;

    int i;
    for (i = 0; i < items; i += 2 ) {
      const char *key = SvPV_nolen(ST(i));
      if (!strcmp( key, "pem_root_certs")) {
        if (SvOK(ST(i+1)))
          pem_root_certs = SvPV_nolen(ST(i+1));
      } else if (!strcmp( key, "pem_private_key")) {
        if (SvOK(ST(i+1)))
          pem_key_cert_pair.private_key = SvPV_nolen(ST(i+1));
      } else if (!strcmp( key, "pem_cert_chain")) {
        if (SvOK(ST(i+1)))
          pem_key_cert_pair.cert_chain = SvPV_nolen(ST(i+1));
      }
    }

    ctx->wrapped = grpc_ssl_credentials_create(
        pem_root_certs,
        pem_key_cert_pair.private_key == NULL ? NULL : &pem_key_cert_pair, NULL
#ifdef GRPC_SSL_CREDENTIALS_HAS_4_ARGS
        , NULL
#endif
    );

 view all matches for this distribution


jQuery-File-Upload

 view release on metacpan or  search on metacpan

lib/jQuery/File/Upload.pm  view on Meta::CPAN

		$_->{thumbnail_upload_dir} = $_->{upload_dir} if $_->{thumbnail_upload_dir} eq '';

		my $path = $_->{upload_dir} . '/' . $self->filename;
		my $thumb_path = $_->{thumbnail_upload_dir} . '/' . $self->thumbnail_filename;

		if(($_->{user} ne '' and $_->{public_key} ne '' and $_->{private_key} ne '') or ($_->{user} ne '' and $_->{password} ne '')) {
			my $ssh2 = $self->_auth_user($_);

			#if it is an image, scp both file and thumbnail
			if($self->is_image) {
				$ssh2->scp_put($self->{tmp_file_path}, $path);

lib/jQuery/File/Upload.pm  view on Meta::CPAN

	my $ssh2 = Net::SSH2->new;

	$ssh2->connect($auth->{host}) or die $!;

	#authenticate
	if($auth->{user} ne '' and $auth->{public_key} ne '' and $auth->{private_key} ne '') {
		$ssh2->auth_publickey($auth->{user},$auth->{public_key},$auth->{private_key});
	}
	else {
		$ssh2->auth_password($auth->{user},$auth->{password});
	}

lib/jQuery/File/Upload.pm  view on Meta::CPAN


  my $j_fu = jQuery::File::Upload->new(
		scp => [{
			user => 'user', #remote user
			public_key => '/home/user/.ssh/id_rsa.pub',	#also possible to use password instead of keys
			private_key => '/home/user/.ssh/id_rsa',
			host => 'mydomain.com',
			upload_dir => '/var/www/html/files', #directory that files will be uploaded to
		}],

		#user validation specifications

lib/jQuery/File/Upload.pm  view on Meta::CPAN


  $j_fu->scp([{
			host => 'media.mydomain.com',
			user => 'user',
		  	public_key => '/home/user/.ssh/id_rsa.pub',
		  	private_key => '/home/user/.ssh/id_rsa',
			password => 'pass', #if keys are present, you do not need password
			upload_dir => '/my/remote/dir',
		}]);

This method takes in an arrayref of hashrefs, where each hashref is a remote host you would like to SCP the files to.

lib/jQuery/File/Upload.pm  view on Meta::CPAN


user (REQUIRED) - used to identify the user to remote server

=item

public_key & private_key - used to make secure connection. Not needed if password is given.

=item

password - used along with user to authenticate with remote server. Not needed if keys are supplied.

 view all matches for this distribution


( run in 0.932 second using v1.01-cache-2.11-cpan-a5abf4f5562 )