Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
6222d27b
Commit
6222d27b
authored
10 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
SSL: Updated to the new Crypto.Sign API.
parent
8d8ad8bf
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib/modules/SSL.pmod/Constants.pmod
+2
-2
2 additions, 2 deletions
lib/modules/SSL.pmod/Constants.pmod
lib/modules/SSL.pmod/Context.pike
+12
-12
12 additions, 12 deletions
lib/modules/SSL.pmod/Context.pike
lib/modules/SSL.pmod/Session.pike
+2
-2
2 additions, 2 deletions
lib/modules/SSL.pmod/Session.pike
with
16 additions
and
16 deletions
lib/modules/SSL.pmod/Constants.pmod
+
2
−
2
View file @
6222d27b
...
@@ -1266,7 +1266,7 @@ class CertificatePair
...
@@ -1266,7 +1266,7 @@ class CertificatePair
int cert_type;
int cert_type;
//! Private key.
//! Private key.
Crypto.Sign key;
Crypto.Sign
.State
key;
//! Chain of certificates, root cert last.
//! Chain of certificates, root cert last.
array(string(8bit)) certs;
array(string(8bit)) certs;
...
@@ -1380,7 +1380,7 @@ class CertificatePair
...
@@ -1380,7 +1380,7 @@ class CertificatePair
//!
//!
//! @note
//! @note
//! Performs various validation checks.
//! Performs various validation checks.
protected void create(Crypto.Sign key, array(string(8bit)) certs,
protected void create(Crypto.Sign
.State
key, array(string(8bit)) certs,
array(string(8bit))|void extra_name_globs)
array(string(8bit))|void extra_name_globs)
{
{
if (!sizeof(certs)) {
if (!sizeof(certs)) {
...
...
This diff is collapsed.
Click to expand it.
lib/modules/SSL.pmod/Context.pike
+
12
−
12
View file @
6222d27b
...
@@ -141,8 +141,8 @@ Alert alert_factory(object con,
...
@@ -141,8 +141,8 @@ Alert alert_factory(object con,
//!
//!
//! When the counters reach zero, the corresponding RSA key is cleared,
//! When the counters reach zero, the corresponding RSA key is cleared,
//! and a new generated on demand at which time the counter is reset.
//! and a new generated on demand at which time the counter is reset.
Crypto.RSA long_rsa;
Crypto.RSA
.State
long_rsa;
Crypto.RSA short_rsa;
Crypto.RSA
.State
short_rsa;
//! Counters for export RSA keys.
//! Counters for export RSA keys.
int long_rsa_counter;
int long_rsa_counter;
...
@@ -713,9 +713,9 @@ array(CertificatePair) find_cert_domain(string(8bit) domain)
...
@@ -713,9 +713,9 @@ array(CertificatePair) find_cert_domain(string(8bit) domain)
//!
//!
//! Supported key types are currently:
//! Supported key types are currently:
//! @mixed
//! @mixed
//! @type Crypto.RSA
//! @type Crypto.RSA
.State
//! Rivest-Shamir-Adelman.
//! Rivest-Shamir-Adelman.
//! @type Crypto.DSA
//! @type Crypto.DSA
.State
//! Digital Signing Algorithm.
//! Digital Signing Algorithm.
//! @type Crypto.ECC.Curve.ECDSA
//! @type Crypto.ECC.Curve.ECDSA
//! Elliptic Curve Digital Signing Algorithm.
//! Elliptic Curve Digital Signing Algorithm.
...
@@ -744,7 +744,7 @@ array(CertificatePair) find_cert_domain(string(8bit) domain)
...
@@ -744,7 +744,7 @@ array(CertificatePair) find_cert_domain(string(8bit) domain)
//!
//!
//! @seealso
//! @seealso
//! @[find_cert()]
//! @[find_cert()]
void add_cert(Crypto.Sign key, array(string(8bit)) certs,
void add_cert(Crypto.Sign
.State
key, array(string(8bit)) certs,
array(string(8bit))|void extra_name_globs)
array(string(8bit))|void extra_name_globs)
{
{
CertificatePair cp = CertificatePair(key, certs, extra_name_globs);
CertificatePair cp = CertificatePair(key, certs, extra_name_globs);
...
@@ -900,7 +900,7 @@ void purge_session(Session s)
...
@@ -900,7 +900,7 @@ void purge_session(Session s)
// --- Compat code below
// --- Compat code below
//
//
protected Crypto.RSA compat_rsa;
protected Crypto.RSA
.State
compat_rsa;
protected array(string(8bit)) compat_certificates;
protected array(string(8bit)) compat_certificates;
//! The servers default private RSA key.
//! The servers default private RSA key.
...
@@ -911,7 +911,7 @@ protected array(string(8bit)) compat_certificates;
...
@@ -911,7 +911,7 @@ protected array(string(8bit)) compat_certificates;
//!
//!
//! @seealso
//! @seealso
//! @[`certificates], @[find_cert()]
//! @[`certificates], @[find_cert()]
__deprecated__ Crypto.RSA `rsa()
__deprecated__ Crypto.RSA
.State
`rsa()
{
{
return compat_rsa;
return compat_rsa;
}
}
...
@@ -924,7 +924,7 @@ __deprecated__ Crypto.RSA `rsa()
...
@@ -924,7 +924,7 @@ __deprecated__ Crypto.RSA `rsa()
//!
//!
//! @seealso
//! @seealso
//! @[`certificates=], @[add_cert()]
//! @[`certificates=], @[add_cert()]
__deprecated__ void `rsa=(Crypto.RSA k)
__deprecated__ void `rsa=(Crypto.RSA
.State
k)
{
{
compat_rsa = k;
compat_rsa = k;
if (k && compat_certificates) {
if (k && compat_certificates) {
...
@@ -976,7 +976,7 @@ __deprecated__ void `certificates=(array(string(8bit)) certs)
...
@@ -976,7 +976,7 @@ __deprecated__ void `certificates=(array(string(8bit)) certs)
//!
//!
//! @seealso
//! @seealso
//! @[`certificates], @[find_cert()]
//! @[`certificates], @[find_cert()]
__deprecated__ Crypto.RSA `client_rsa()
__deprecated__ Crypto.RSA
.State
`client_rsa()
{
{
return compat_rsa;
return compat_rsa;
}
}
...
@@ -989,7 +989,7 @@ __deprecated__ Crypto.RSA `client_rsa()
...
@@ -989,7 +989,7 @@ __deprecated__ Crypto.RSA `client_rsa()
//!
//!
//! @seealso
//! @seealso
//! @[`client_certificates=], @[add_cert()]
//! @[`client_certificates=], @[add_cert()]
__deprecated__ void `client_rsa=(Crypto.RSA k)
__deprecated__ void `client_rsa=(Crypto.RSA
.State
k)
{
{
compat_rsa = k;
compat_rsa = k;
if (k && compat_certificates) {
if (k && compat_certificates) {
...
@@ -1037,14 +1037,14 @@ __deprecated__ void `client_certificates=(array(array(string(8bit))) certs)
...
@@ -1037,14 +1037,14 @@ __deprecated__ void `client_certificates=(array(array(string(8bit))) certs)
//! Compatibility.
//! Compatibility.
//! @deprecated find_cert
//! @deprecated find_cert
__deprecated__ Crypto.DSA `dsa()
__deprecated__ Crypto.DSA
.State
`dsa()
{
{
return UNDEFINED;
return UNDEFINED;
}
}
//! Compatibility.
//! Compatibility.
//! @deprecated add_cert
//! @deprecated add_cert
__deprecated__ void `dsa=(Crypto.DSA k)
__deprecated__ void `dsa=(Crypto.DSA
.State
k)
{
{
error("The old DSA API is not supported anymore.\n");
error("The old DSA API is not supported anymore.\n");
}
}
...
...
This diff is collapsed.
Click to expand it.
lib/modules/SSL.pmod/Session.pike
+
2
−
2
View file @
6222d27b
...
@@ -54,10 +54,10 @@ array(string(8bit)) peer_certificate_chain;
...
@@ -54,10 +54,10 @@ array(string(8bit)) peer_certificate_chain;
array(string(8bit)) certificate_chain;
array(string(8bit)) certificate_chain;
//! Our private key.
//! Our private key.
Crypto.Sign private_key;
Crypto.Sign
.State
private_key;
//! The peer's public key (from the certificate).
//! The peer's public key (from the certificate).
Crypto.Sign peer_public_key;
Crypto.Sign
.State
peer_public_key;
//! The max fragment size requested by the client.
//! The max fragment size requested by the client.
int max_packet_size = PACKET_MAX_SIZE;
int max_packet_size = PACKET_MAX_SIZE;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment