merge conflicts, regen

This commit is contained in:
christos 2020-12-10 00:33:08 +00:00
parent f30e0929c0
commit 4a7cf967a5
574 changed files with 4120 additions and 5040 deletions

View File

@ -7,6 +7,69 @@
https://github.com/openssl/openssl/commits/ and pick the appropriate
release branch.
Changes between 1.1.1h and 1.1.1i [8 Dec 2020]
*) Fixed NULL pointer deref in the GENERAL_NAME_cmp function
This function could crash if both GENERAL_NAMEs contain an EDIPARTYNAME.
If an attacker can control both items being compared then this could lead
to a possible denial of service attack. OpenSSL itself uses the
GENERAL_NAME_cmp function for two purposes:
1) Comparing CRL distribution point names between an available CRL and a
CRL distribution point embedded in an X509 certificate
2) When verifying that a timestamp response token signer matches the
timestamp authority name (exposed via the API functions
TS_RESP_verify_response and TS_RESP_verify_token)
(CVE-2020-1971)
[Matt Caswell]
*) Add support for Apple Silicon M1 Macs with the darwin64-arm64-cc target.
[Stuart Carnie]
*) The security callback, which can be customised by application code, supports
the security operation SSL_SECOP_TMP_DH. This is defined to take an EVP_PKEY
in the "other" parameter. In most places this is what is passed. All these
places occur server side. However there was one client side call of this
security operation and it passed a DH object instead. This is incorrect
according to the definition of SSL_SECOP_TMP_DH, and is inconsistent with all
of the other locations. Therefore this client side call has been changed to
pass an EVP_PKEY instead.
[Matt Caswell]
*) In 1.1.1h, an expired trusted (root) certificate was not anymore rejected
when validating a certificate path. This check is restored in 1.1.1i.
[David von Oheimb]
Changes between 1.1.1g and 1.1.1h [22 Sep 2020]
*) Certificates with explicit curve parameters are now disallowed in
verification chains if the X509_V_FLAG_X509_STRICT flag is used.
[Tomas Mraz]
*) The 'MinProtocol' and 'MaxProtocol' configuration commands now silently
ignore TLS protocol version bounds when configuring DTLS-based contexts, and
conversely, silently ignore DTLS protocol version bounds when configuring
TLS-based contexts. The commands can be repeated to set bounds of both
types. The same applies with the corresponding "min_protocol" and
"max_protocol" command-line switches, in case some application uses both TLS
and DTLS.
SSL_CTX instances that are created for a fixed protocol version (e.g.
TLSv1_server_method()) also silently ignore version bounds. Previously
attempts to apply bounds to these protocol versions would result in an
error. Now only the "version-flexible" SSL_CTX instances are subject to
limits in configuration files in command-line options.
[Viktor Dukhovni]
*) Handshake now fails if Extended Master Secret extension is dropped
on renegotiation.
[Tomas Mraz]
*) Accidentally, an expired trusted (root) certificate is not anymore rejected
when validating a certificate path.
[David von Oheimb]
*) The Oracle Developer Studio compiler will start reporting deprecated APIs
Changes between 1.1.1f and 1.1.1g [21 Apr 2020]
*) Fixed segmentation fault in SSL_check_chain()

View File

@ -217,12 +217,22 @@ sub resolve_config;
# Unified build supports separate build dir
my $srcdir = catdir(absolutedir(dirname($0))); # catdir ensures local syntax
my $blddir = catdir(absolutedir(".")); # catdir ensures local syntax
# File::Spec::Unix doesn't detect case insensitivity, so we make sure to
# check if the source and build directory are really the same, and make
# them so. This avoids all kinds of confusion later on.
# We must check @File::Spec::ISA rather than using File::Spec->isa() to
# know if File::Spec ended up loading File::Spec::Unix.
$srcdir = $blddir
if (grep(/::Unix$/, @File::Spec::ISA)
&& samedir($srcdir, $blddir));
my $dofile = abs2rel(catfile($srcdir, "util/dofile.pl"));
my $local_config_envname = 'OPENSSL_LOCAL_CONFIG_DIR';
$config{sourcedir} = abs2rel($srcdir);
$config{builddir} = abs2rel($blddir);
$config{sourcedir} = abs2rel($srcdir, $blddir);
$config{builddir} = abs2rel($blddir, $blddir);
# Collect reconfiguration information if needed
my @argvcopy=@ARGV;
@ -1049,6 +1059,9 @@ if (scalar(@seed_sources) == 0) {
print "Using os-specific seed configuration\n";
push @seed_sources, 'os';
}
if (scalar(grep { $_ eq 'egd' } @seed_sources) > 0) {
delete $disabled{'egd'};
}
if (scalar(grep { $_ eq 'none' } @seed_sources) > 0) {
die "Cannot seed with none and anything else" if scalar(@seed_sources) > 1;
warn <<_____ if scalar(@seed_sources) == 1;
@ -3424,6 +3437,27 @@ sub absolutedir {
return realpath($dir);
}
# Check if all paths are one and the same, using stat. They must both exist
# We need this for the cases when File::Spec doesn't detect case insensitivity
# (File::Spec::Unix assumes case sensitivity)
sub samedir {
die "samedir expects two arguments\n" unless scalar @_ == 2;
my @stat0 = stat($_[0]); # First argument
my @stat1 = stat($_[1]); # Second argument
die "Couldn't stat $_[0]" unless @stat0;
die "Couldn't stat $_[1]" unless @stat1;
# Compare device number
return 0 unless ($stat0[0] == $stat1[0]);
# Compare "inode". The perl manual recommends comparing as
# string rather than as number.
return 0 unless ($stat0[1] eq $stat1[1]);
return 1; # All the same
}
sub quotify {
my %processors = (
perl => sub { my $x = shift;

View File

@ -5,6 +5,18 @@
This file gives a brief overview of the major changes between each OpenSSL
release. For more details please read the CHANGES file.
Major changes between OpenSSL 1.1.1h and OpenSSL 1.1.1i [8 Dec 2020]
o Fixed NULL pointer deref in GENERAL_NAME_cmp (CVE-2020-1971)
Major changes between OpenSSL 1.1.1g and OpenSSL 1.1.1h [22 Sep 2020]
o Disallow explicit curve parameters in verifications chains when
X509_V_FLAG_X509_STRICT is used
o Enable 'MinProtocol' and 'MaxProtocol' to configure both TLS and DTLS
contexts
o Oracle Developer Studio will start reporting deprecation warnings
Major changes between OpenSSL 1.1.1f and OpenSSL 1.1.1g [21 Apr 2020]
o Fixed segmentation fault in SSL_check_chain() (CVE-2020-1967)

View File

@ -1,5 +1,5 @@
OpenSSL 1.1.1g 21 Apr 2020
OpenSSL 1.1.1i 8 Dec 2020
Copyright (c) 1998-2020 The OpenSSL Project
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -1862,8 +1862,8 @@ static int do_body(X509 **xret, EVP_PKEY *pkey, X509 *x509,
row[DB_exp_date][tm->length] = '\0';
row[DB_rev_date] = NULL;
row[DB_file] = OPENSSL_strdup("unknown");
if ((row[DB_type] == NULL) || (row[DB_exp_date] == NULL) ||
(row[DB_file] == NULL) || (row[DB_name] == NULL)) {
if ((row[DB_type] == NULL) || (row[DB_file] == NULL)
|| (row[DB_name] == NULL)) {
BIO_printf(bio_err, "Memory allocation failure\n");
goto end;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2005 Nokia. All rights reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
@ -1283,22 +1283,42 @@ int s_client_main(int argc, char **argv)
case OPT_SSL3:
min_version = SSL3_VERSION;
max_version = SSL3_VERSION;
socket_type = SOCK_STREAM;
#ifndef OPENSSL_NO_DTLS
isdtls = 0;
#endif
break;
case OPT_TLS1_3:
min_version = TLS1_3_VERSION;
max_version = TLS1_3_VERSION;
socket_type = SOCK_STREAM;
#ifndef OPENSSL_NO_DTLS
isdtls = 0;
#endif
break;
case OPT_TLS1_2:
min_version = TLS1_2_VERSION;
max_version = TLS1_2_VERSION;
socket_type = SOCK_STREAM;
#ifndef OPENSSL_NO_DTLS
isdtls = 0;
#endif
break;
case OPT_TLS1_1:
min_version = TLS1_1_VERSION;
max_version = TLS1_1_VERSION;
socket_type = SOCK_STREAM;
#ifndef OPENSSL_NO_DTLS
isdtls = 0;
#endif
break;
case OPT_TLS1:
min_version = TLS1_VERSION;
max_version = TLS1_VERSION;
socket_type = SOCK_STREAM;
#ifndef OPENSSL_NO_DTLS
isdtls = 0;
#endif
break;
case OPT_DTLS:
#ifndef OPENSSL_NO_DTLS

View File

@ -108,7 +108,7 @@ $avx=1 if (!$avx && $win64 && ($flavour =~ /nasm/ || $ENV{ASM} =~ /nasm/) &&
$avx=1 if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
`ml64 2>&1` =~ /Version ([0-9]+)\./ &&
$1>=10);
$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0);
$avx=1 if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/ && $2>=3.0);
$shaext=1; ### set to zero if compiling for 1.0.1

View File

@ -1,5 +1,5 @@
/*
* Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -182,6 +182,15 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in,
tag, aclass, opt, ctx);
case ASN1_ITYPE_MSTRING:
/*
* It never makes sense for multi-strings to have implicit tagging, so
* if tag != -1, then this looks like an error in the template.
*/
if (tag != -1) {
ASN1err(ASN1_F_ASN1_ITEM_EMBED_D2I, ASN1_R_BAD_TEMPLATE);
goto err;
}
p = *in;
/* Just read in tag and class */
ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
@ -199,6 +208,7 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in,
ASN1err(ASN1_F_ASN1_ITEM_EMBED_D2I, ASN1_R_MSTRING_NOT_UNIVERSAL);
goto err;
}
/* Check tag matches bit map */
if (!(ASN1_tag2bit(otag) & it->utype)) {
/* If OPTIONAL, assume this is OK */
@ -215,6 +225,15 @@ static int asn1_item_embed_d2i(ASN1_VALUE **pval, const unsigned char **in,
return ef->asn1_ex_d2i(pval, in, len, it, tag, aclass, opt, ctx);
case ASN1_ITYPE_CHOICE:
/*
* It never makes sense for CHOICE types to have implicit tagging, so
* if tag != -1, then this looks like an error in the template.
*/
if (tag != -1) {
ASN1err(ASN1_F_ASN1_ITEM_EMBED_D2I, ASN1_R_BAD_TEMPLATE);
goto err;
}
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
goto auxerr;
if (*pval) {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -103,9 +103,25 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out,
return asn1_i2d_ex_primitive(pval, out, it, tag, aclass);
case ASN1_ITYPE_MSTRING:
/*
* It never makes sense for multi-strings to have implicit tagging, so
* if tag != -1, then this looks like an error in the template.
*/
if (tag != -1) {
ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
return -1;
}
return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
case ASN1_ITYPE_CHOICE:
/*
* It never makes sense for CHOICE types to have implicit tagging, so
* if tag != -1, then this looks like an error in the template.
*/
if (tag != -1) {
ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
return -1;
}
if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
return 0;
i = asn1_get_choice_selector(pval, it);

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -87,6 +87,15 @@ const BIGNUM *BN_value_one(void)
return &const_one;
}
/*
* Old Visual Studio ARM compiler miscompiles BN_num_bits_word()
* https://mta.openssl.org/pipermail/openssl-users/2018-August/008465.html
*/
#if defined(_MSC_VER) && defined(_ARM_) && defined(_WIN32_WCE) \
&& _MSC_VER>=1400 && _MSC_VER<1501
# define MS_BROKEN_BN_num_bits_word
# pragma optimize("", off)
#endif
int BN_num_bits_word(BN_ULONG l)
{
BN_ULONG x, mask;
@ -131,6 +140,9 @@ int BN_num_bits_word(BN_ULONG l)
return bits;
}
#ifdef MS_BROKEN_BN_num_bits_word
# pragma optimize("", on)
#endif
/*
* This function still leaks `a->dmax`: it's caller's responsibility to
@ -322,15 +334,19 @@ BIGNUM *BN_dup(const BIGNUM *a)
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
{
int bn_words;
bn_check_top(b);
bn_words = BN_get_flags(b, BN_FLG_CONSTTIME) ? b->dmax : b->top;
if (a == b)
return a;
if (bn_wexpand(a, b->top) == NULL)
if (bn_wexpand(a, bn_words) == NULL)
return NULL;
if (b->top > 0)
memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
memcpy(a->d, b->d, sizeof(b->d[0]) * bn_words);
a->neg = b->neg;
a->top = b->top;

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -376,11 +376,13 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
if (biosk == NULL) {
if ((biosk = sk_BIO_new_null()) == NULL) {
CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
BIO_free(next);
goto err;
}
}
if (!sk_BIO_push(biosk, in)) {
CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
BIO_free(next);
goto err;
}
/* continue with reading from the included BIO */

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/*
* Copyright 2006-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -23,7 +23,7 @@ static int ecdh_cms_decrypt(CMS_RecipientInfo *ri);
static int ecdh_cms_encrypt(CMS_RecipientInfo *ri);
#endif
static int eckey_param2type(int *pptype, void **ppval, EC_KEY *ec_key)
static int eckey_param2type(int *pptype, void **ppval, const EC_KEY *ec_key)
{
const EC_GROUP *group;
int nid;
@ -35,7 +35,14 @@ static int eckey_param2type(int *pptype, void **ppval, EC_KEY *ec_key)
&& (nid = EC_GROUP_get_curve_name(group)))
/* we have a 'named curve' => just set the OID */
{
*ppval = OBJ_nid2obj(nid);
ASN1_OBJECT *asn1obj = OBJ_nid2obj(nid);
if (asn1obj == NULL || OBJ_length(asn1obj) == 0) {
ASN1_OBJECT_free(asn1obj);
ECerr(EC_F_ECKEY_PARAM2TYPE, EC_R_MISSING_OID);
return 0;
}
*ppval = asn1obj;
*pptype = V_ASN1_OBJECT;
} else { /* explicit parameters */
@ -43,7 +50,17 @@ static int eckey_param2type(int *pptype, void **ppval, EC_KEY *ec_key)
pstr = ASN1_STRING_new();
if (pstr == NULL)
return 0;
pstr->length = i2d_ECParameters(ec_key, &pstr->data);
/*
* The cast in the following line is intentional as the
* `i2d_ECParameters` signature can't be constified (see discussion at
* https://github.com/openssl/openssl/pull/9347 where related and
* required constification backports were rejected).
*
* This cast should be safe anyway, because we can expect
* `i2d_ECParameters()` to treat the first argument as if it was const.
*/
pstr->length = i2d_ECParameters((EC_KEY *)ec_key, &pstr->data);
if (pstr->length <= 0) {
ASN1_STRING_free(pstr);
ECerr(EC_F_ECKEY_PARAM2TYPE, ERR_R_EC_LIB);
@ -57,7 +74,7 @@ static int eckey_param2type(int *pptype, void **ppval, EC_KEY *ec_key)
static int eckey_pub_encode(X509_PUBKEY *pk, const EVP_PKEY *pkey)
{
EC_KEY *ec_key = pkey->pkey.ec;
const EC_KEY *ec_key = pkey->pkey.ec;
void *pval = NULL;
int ptype;
unsigned char *penc = NULL, *p;

View File

@ -137,6 +137,12 @@ struct ec_parameters_st {
ASN1_INTEGER *cofactor;
} /* ECPARAMETERS */ ;
typedef enum {
ECPKPARAMETERS_TYPE_NAMED = 0,
ECPKPARAMETERS_TYPE_EXPLICIT,
ECPKPARAMETERS_TYPE_IMPLICIT
} ecpk_parameters_type_t;
struct ecpk_parameters_st {
int type;
union {
@ -535,9 +541,10 @@ ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group,
return NULL;
}
} else {
if (ret->type == 0)
if (ret->type == ECPKPARAMETERS_TYPE_NAMED)
ASN1_OBJECT_free(ret->value.named_curve);
else if (ret->type == 1 && ret->value.parameters)
else if (ret->type == ECPKPARAMETERS_TYPE_EXPLICIT
&& ret->value.parameters != NULL)
ECPARAMETERS_free(ret->value.parameters);
}
@ -547,15 +554,22 @@ ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group,
*/
tmp = EC_GROUP_get_curve_name(group);
if (tmp) {
ret->type = 0;
if ((ret->value.named_curve = OBJ_nid2obj(tmp)) == NULL)
ASN1_OBJECT *asn1obj = OBJ_nid2obj(tmp);
if (asn1obj == NULL || OBJ_length(asn1obj) == 0) {
ASN1_OBJECT_free(asn1obj);
ECerr(EC_F_EC_GROUP_GET_ECPKPARAMETERS, EC_R_MISSING_OID);
ok = 0;
} else {
ret->type = ECPKPARAMETERS_TYPE_NAMED;
ret->value.named_curve = asn1obj;
}
} else
/* we don't know the nid => ERROR */
ok = 0;
} else {
/* use the ECPARAMETERS structure */
ret->type = 1;
ret->type = ECPKPARAMETERS_TYPE_EXPLICIT;
if ((ret->value.parameters =
EC_GROUP_get_ecparameters(group, NULL)) == NULL)
ok = 0;
@ -894,7 +908,8 @@ EC_GROUP *EC_GROUP_new_from_ecpkparameters(const ECPKPARAMETERS *params)
return NULL;
}
if (params->type == 0) { /* the curve is given by an OID */
if (params->type == ECPKPARAMETERS_TYPE_NAMED) {
/* the curve is given by an OID */
tmp = OBJ_obj2nid(params->value.named_curve);
if ((ret = EC_GROUP_new_by_curve_name(tmp)) == NULL) {
ECerr(EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS,
@ -902,15 +917,16 @@ EC_GROUP *EC_GROUP_new_from_ecpkparameters(const ECPKPARAMETERS *params)
return NULL;
}
EC_GROUP_set_asn1_flag(ret, OPENSSL_EC_NAMED_CURVE);
} else if (params->type == 1) { /* the parameters are given by a
* ECPARAMETERS structure */
} else if (params->type == ECPKPARAMETERS_TYPE_EXPLICIT) {
/* the parameters are given by an ECPARAMETERS structure */
ret = EC_GROUP_new_from_ecparameters(params->value.parameters);
if (!ret) {
ECerr(EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS, ERR_R_EC_LIB);
return NULL;
}
EC_GROUP_set_asn1_flag(ret, OPENSSL_EC_EXPLICIT_CURVE);
} else if (params->type == 2) { /* implicitlyCA */
} else if (params->type == ECPKPARAMETERS_TYPE_IMPLICIT) {
/* implicit parameters inherited from CA - unsupported */
return NULL;
} else {
ECerr(EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS, EC_R_ASN1_ERROR);
@ -940,6 +956,9 @@ EC_GROUP *d2i_ECPKParameters(EC_GROUP **a, const unsigned char **in, long len)
return NULL;
}
if (params->type == ECPKPARAMETERS_TYPE_EXPLICIT)
group->decoded_from_explicit_params = 1;
if (a) {
EC_GROUP_free(*a);
*a = group;
@ -991,6 +1010,9 @@ EC_KEY *d2i_ECPrivateKey(EC_KEY **a, const unsigned char **in, long len)
if (priv_key->parameters) {
EC_GROUP_free(ret->group);
ret->group = EC_GROUP_new_from_ecpkparameters(priv_key->parameters);
if (ret->group != NULL
&& priv_key->parameters->type == ECPKPARAMETERS_TYPE_EXPLICIT)
ret->group->decoded_from_explicit_params = 1;
}
if (ret->group == NULL) {

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
@ -14,6 +14,7 @@
#include "internal/refcount.h"
#include <openssl/err.h>
#include <openssl/engine.h>
#include "crypto/bn.h"
EC_KEY *EC_KEY_new(void)
{
@ -416,17 +417,86 @@ const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key)
int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key)
{
int fixed_top;
const BIGNUM *order = NULL;
BIGNUM *tmp_key = NULL;
if (key->group == NULL || key->group->meth == NULL)
return 0;
/*
* Not only should key->group be set, but it should also be in a valid
* fully initialized state.
*
* Specifically, to operate in constant time, we need that the group order
* is set, as we use its length as the fixed public size of any scalar used
* as an EC private key.
*/
order = EC_GROUP_get0_order(key->group);
if (order == NULL || BN_is_zero(order))
return 0; /* This should never happen */
if (key->group->meth->set_private != NULL
&& key->group->meth->set_private(key, priv_key) == 0)
return 0;
if (key->meth->set_private != NULL
&& key->meth->set_private(key, priv_key) == 0)
return 0;
/*
* We should never leak the bit length of the secret scalar in the key,
* so we always set the `BN_FLG_CONSTTIME` flag on the internal `BIGNUM`
* holding the secret scalar.
*
* This is important also because `BN_dup()` (and `BN_copy()`) do not
* propagate the `BN_FLG_CONSTTIME` flag from the source `BIGNUM`, and
* this brings an extra risk of inadvertently losing the flag, even when
* the caller specifically set it.
*
* The propagation has been turned on and off a few times in the past
* years because in some conditions has shown unintended consequences in
* some code paths, so at the moment we can't fix this in the BN layer.
*
* In `EC_KEY_set_private_key()` we can work around the propagation by
* manually setting the flag after `BN_dup()` as we know for sure that
* inside the EC module the `BN_FLG_CONSTTIME` is always treated
* correctly and should not generate unintended consequences.
*
* Setting the BN_FLG_CONSTTIME flag alone is never enough, we also have
* to preallocate the BIGNUM internal buffer to a fixed public size big
* enough that operations performed during the processing never trigger
* a realloc which would leak the size of the scalar through memory
* accesses.
*
* Fixed Length
* ------------
*
* The order of the large prime subgroup of the curve is our choice for
* a fixed public size, as that is generally the upper bound for
* generating a private key in EC cryptosystems and should fit all valid
* secret scalars.
*
* For preallocating the BIGNUM storage we look at the number of "words"
* required for the internal representation of the order, and we
* preallocate 2 extra "words" in case any of the subsequent processing
* might temporarily overflow the order length.
*/
tmp_key = BN_dup(priv_key);
if (tmp_key == NULL)
return 0;
BN_set_flags(tmp_key, BN_FLG_CONSTTIME);
fixed_top = bn_get_top(order) + 2;
if (bn_wexpand(tmp_key, fixed_top) == NULL) {
BN_clear_free(tmp_key);
return 0;
}
BN_clear_free(key->priv_key);
key->priv_key = BN_dup(priv_key);
return (key->priv_key == NULL) ? 0 : 1;
key->priv_key = tmp_key;
return 1;
}
const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key)
@ -494,6 +564,13 @@ void EC_KEY_clear_flags(EC_KEY *key, int flags)
key->flags &= ~flags;
}
int EC_KEY_decoded_from_explicit_params(const EC_KEY *key)
{
if (key == NULL || key->group == NULL)
return -1;
return key->group->decoded_from_explicit_params;
}
size_t EC_KEY_key2buf(const EC_KEY *key, point_conversion_form_t form,
unsigned char **pbuf, BN_CTX *ctx)
{

View File

@ -211,6 +211,7 @@ int EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)
dest->asn1_flag = src->asn1_flag;
dest->asn1_form = src->asn1_form;
dest->decoded_from_explicit_params = src->decoded_from_explicit_params;
if (src->seed) {
OPENSSL_free(dest->seed);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -171,6 +171,7 @@ void engine_cleanup_int(void)
cleanup_stack = NULL;
}
CRYPTO_THREAD_lock_free(global_engine_lock);
global_engine_lock = NULL;
}
/* Now the "ex_data" support */

View File

@ -130,11 +130,6 @@ void bsaes_xts_decrypt(const unsigned char *inp, unsigned char *out,
size_t len, const AES_KEY *key1,
const AES_KEY *key2, const unsigned char iv[16]);
#endif
#if !defined(AES_ASM) && !defined(AES_CTR_ASM) \
&& defined(OPENSSL_AES_CONST_TIME) \
&& !defined(OPENSSL_SMALL_FOOTPRINT)
# define AES_CTR_ASM
#endif
#ifdef AES_CTR_ASM
void AES_ctr32_encrypt(const unsigned char *in, unsigned char *out,
size_t blocks, const AES_KEY *key,

View File

@ -1,5 +1,5 @@
/*
* Copyright 2010-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -11,6 +11,12 @@
#include "modes_local.h"
#include <string.h>
#if defined(__GNUC__) && !defined(STRICT_ALIGNMENT)
typedef size_t size_t_aX __attribute((__aligned__(1)));
#else
typedef size_t size_t_aX;
#endif
#if defined(BSWAP4) && defined(STRICT_ALIGNMENT)
/* redefine, because alignment is ensured */
# undef GETU32
@ -1080,8 +1086,8 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
size_t j = GHASH_CHUNK;
while (j) {
size_t *out_t = (size_t *)out;
const size_t *in_t = (const size_t *)in;
size_t_aX *out_t = (size_t_aX *)out;
const size_t_aX *in_t = (const size_t_aX *)in;
(*block) (ctx->Yi.c, ctx->EKi.c, key);
++ctr;
@ -1107,8 +1113,8 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
size_t j = i;
while (len >= 16) {
size_t *out_t = (size_t *)out;
const size_t *in_t = (const size_t *)in;
size_t_aX *out_t = (size_t_aX *)out;
const size_t_aX *in_t = (const size_t_aX *)in;
(*block) (ctx->Yi.c, ctx->EKi.c, key);
++ctr;
@ -1318,8 +1324,8 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
GHASH(ctx, in, GHASH_CHUNK);
while (j) {
size_t *out_t = (size_t *)out;
const size_t *in_t = (const size_t *)in;
size_t_aX *out_t = (size_t_aX *)out;
const size_t_aX *in_t = (const size_t_aX *)in;
(*block) (ctx->Yi.c, ctx->EKi.c, key);
++ctr;
@ -1343,8 +1349,8 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
if ((i = (len & (size_t)-16))) {
GHASH(ctx, in, i);
while (len >= 16) {
size_t *out_t = (size_t *)out;
const size_t *in_t = (const size_t *)in;
size_t_aX *out_t = (size_t_aX *)out;
const size_t_aX *in_t = (const size_t_aX *)in;
(*block) (ctx->Yi.c, ctx->EKi.c, key);
++ctr;

View File

@ -366,12 +366,19 @@ static ssize_t syscall_random(void *buf, size_t buflen)
* - OpenBSD since 5.6
* - Linux since 3.17 with glibc 2.25
* - FreeBSD since 12.0 (1200061)
*
* Note: Sometimes getentropy() can be provided but not implemented
* internally. So we need to check errno for ENOSYS
*/
# if defined(__GNUC__) && __GNUC__>=2 && defined(__ELF__) && !defined(__hpux)
extern int getentropy(void *buffer, size_t length) __attribute__((weak));
if (getentropy != NULL)
return getentropy(buf, buflen) == 0 ? (ssize_t)buflen : -1;
if (getentropy != NULL) {
if (getentropy(buf, buflen) == 0)
return (ssize_t)buflen;
if (errno != ENOSYS)
return -1;
}
# else
union {
void *p;
@ -412,7 +419,8 @@ static struct random_device {
} random_devices[OSSL_NELEM(random_device_paths)];
static int keep_random_devices_open = 1;
# if defined(__linux) && defined(DEVRANDOM_WAIT)
# if defined(__linux) && defined(DEVRANDOM_WAIT) \
&& defined(OPENSSL_RAND_SEED_GETRANDOM)
static void *shm_addr;
static void cleanup_shm(void)
@ -490,7 +498,7 @@ static int wait_random_seeded(void)
}
return seeded;
}
# else /* defined __linux */
# else /* defined __linux && DEVRANDOM_WAIT && OPENSSL_RAND_SEED_GETRANDOM */
static int wait_random_seeded(void)
{
return 1;

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -26,7 +26,7 @@
#ifndef OPENSSL_NO_POSIX_IO
# include <sys/stat.h>
# include <fcntl.h>
# ifdef _WIN32
# if defined(_WIN32) && !defined(_WIN32_WCE)
# include <windows.h>
# include <io.h>
# define stat _stat

View File

@ -119,7 +119,7 @@ if (!$avx && $win64 && ($flavour =~ /masm/ || $ENV{ASM} =~ /ml64/) &&
$avx = ($1>=10) + ($1>=11);
}
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:^clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) {
if (!$avx && `$ENV{CC} -v 2>&1` =~ /((?:clang|LLVM) version|.*based on LLVM) ([0-9]+\.[0-9]+)/) {
$avx = ($2>=3.0) + ($2>3.0);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -439,6 +439,16 @@ static int open_console(UI *ui)
is_a_tty = 0;
else
# endif
# ifdef EPERM
/*
* Linux can return EPERM (Operation not permitted),
* e.g. if a daemon executes openssl via fork()+execve()
* This should be ok
*/
if (errno == EPERM)
is_a_tty = 0;
else
# endif
# ifdef ENODEV
/*
* MacOS X returns ENODEV (Operation not supported by device),

View File

@ -80,6 +80,7 @@ static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
static int check_dane_issuer(X509_STORE_CTX *ctx, int depth);
static int check_key_level(X509_STORE_CTX *ctx, X509 *cert);
static int check_sig_level(X509_STORE_CTX *ctx, X509 *cert);
static int check_curve(X509 *cert);
static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
unsigned int *preasons, X509_CRL *crl, X509 *x);
@ -104,7 +105,12 @@ static int null_callback(int ok, X509_STORE_CTX *e)
return ok;
}
/* Return 1 is a certificate is self signed */
/*
* Return 1 if given cert is considered self-signed, 0 if not or on error.
* This does not verify self-signedness but relies on x509v3_cache_extensions()
* matching issuer and subject names (i.e., the cert being self-issued) and any
* present authority key identifier matching the subject key identifier, etc.
*/
static int cert_self_signed(X509 *x)
{
if (X509_check_purpose(x, -1, 0) != 1)
@ -131,10 +137,9 @@ static X509 *lookup_cert_match(X509_STORE_CTX *ctx, X509 *x)
xtmp = sk_X509_value(certs, i);
if (!X509_cmp(xtmp, x))
break;
xtmp = NULL;
}
if (i < sk_X509_num(certs))
X509_up_ref(xtmp);
else
if (xtmp != NULL && !X509_up_ref(xtmp))
xtmp = NULL;
sk_X509_pop_free(certs, X509_free);
return xtmp;
@ -267,17 +272,24 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
return -1;
}
if (!X509_up_ref(ctx->cert)) {
X509err(X509_F_X509_VERIFY_CERT, ERR_R_INTERNAL_ERROR);
ctx->error = X509_V_ERR_UNSPECIFIED;
return -1;
}
/*
* first we make sure the chain we are going to build is present and that
* the first entry is in place
*/
if (((ctx->chain = sk_X509_new_null()) == NULL) ||
(!sk_X509_push(ctx->chain, ctx->cert))) {
if ((ctx->chain = sk_X509_new_null()) == NULL
|| !sk_X509_push(ctx->chain, ctx->cert)) {
X509_free(ctx->cert);
X509err(X509_F_X509_VERIFY_CERT, ERR_R_MALLOC_FAILURE);
ctx->error = X509_V_ERR_OUT_OF_MEM;
return -1;
}
X509_up_ref(ctx->cert);
ctx->num_untrusted = 1;
/* If the peer's public key is too weak, we can stop early. */
@ -300,8 +312,20 @@ int X509_verify_cert(X509_STORE_CTX *ctx)
return ret;
}
static int sk_X509_contains(STACK_OF(X509) *sk, X509 *cert)
{
int i, n = sk_X509_num(sk);
for (i = 0; i < n; i++)
if (X509_cmp(sk_X509_value(sk, i), cert) == 0)
return 1;
return 0;
}
/*
* Given a STACK_OF(X509) find the issuer of cert (if any)
* Find in given STACK_OF(X509) sk a non-expired issuer cert (if any) of given cert x.
* The issuer must not be the same as x and must not yet be in ctx->chain, where the
* exceptional case x is self-issued and ctx->chain has just one element is allowed.
*/
static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x)
{
@ -310,7 +334,13 @@ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x)
for (i = 0; i < sk_X509_num(sk); i++) {
issuer = sk_X509_value(sk, i);
if (ctx->check_issued(ctx, x, issuer)) {
/*
* Below check 'issuer != x' is an optimization and safety precaution:
* Candidate issuer cert cannot be the same as the subject cert 'x'.
*/
if (issuer != x && ctx->check_issued(ctx, x, issuer)
&& (((x->ex_flags & EXFLAG_SI) != 0 && sk_X509_num(ctx->chain) == 1)
|| !sk_X509_contains(ctx->chain, issuer))) {
rv = issuer;
if (x509_check_cert_time(ctx, rv, -1))
break;
@ -319,42 +349,25 @@ static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x)
return rv;
}
/* Given a possible certificate and issuer check them */
/* Check that the given certificate 'x' is issued by the certificate 'issuer' */
static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
{
int ret;
if (x == issuer)
return cert_self_signed(x);
ret = X509_check_issued(issuer, x);
if (ret == X509_V_OK) {
int i;
X509 *ch;
/* Special case: single self signed certificate */
if (cert_self_signed(x) && sk_X509_num(ctx->chain) == 1)
return 1;
for (i = 0; i < sk_X509_num(ctx->chain); i++) {
ch = sk_X509_value(ctx->chain, i);
if (ch == issuer || !X509_cmp(ch, issuer)) {
ret = X509_V_ERR_PATH_LOOP;
break;
}
}
}
return (ret == X509_V_OK);
return x509_likely_issued(issuer, x) == X509_V_OK;
}
/* Alternative lookup method: look from a STACK stored in other_ctx */
static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
{
*issuer = find_issuer(ctx, ctx->other_ctx, x);
if (*issuer) {
X509_up_ref(*issuer);
return 1;
} else
return 0;
if (*issuer == NULL || !X509_up_ref(*issuer))
goto err;
return 1;
err:
*issuer = NULL;
return 0;
}
static STACK_OF(X509) *lookup_certs_sk(X509_STORE_CTX *ctx, X509_NAME *nm)
@ -366,15 +379,21 @@ static STACK_OF(X509) *lookup_certs_sk(X509_STORE_CTX *ctx, X509_NAME *nm)
for (i = 0; i < sk_X509_num(ctx->other_ctx); i++) {
x = sk_X509_value(ctx->other_ctx, i);
if (X509_NAME_cmp(nm, X509_get_subject_name(x)) == 0) {
if (!X509_up_ref(x)) {
sk_X509_pop_free(sk, X509_free);
X509err(X509_F_LOOKUP_CERTS_SK, ERR_R_INTERNAL_ERROR);
ctx->error = X509_V_ERR_UNSPECIFIED;
return NULL;
}
if (sk == NULL)
sk = sk_X509_new_null();
if (sk == NULL || sk_X509_push(sk, x) == 0) {
if (sk == NULL || !sk_X509_push(sk, x)) {
X509_free(x);
sk_X509_pop_free(sk, X509_free);
X509err(X509_F_LOOKUP_CERTS_SK, ERR_R_MALLOC_FAILURE);
ctx->error = X509_V_ERR_OUT_OF_MEM;
return NULL;
}
X509_up_ref(x);
}
}
return sk;
@ -508,6 +527,14 @@ static int check_chain_extensions(X509_STORE_CTX *ctx)
ret = 1;
break;
}
if ((ctx->param->flags & X509_V_FLAG_X509_STRICT) && num > 1) {
/* Check for presence of explicit elliptic curve parameters */
ret = check_curve(x);
if (ret < 0)
ctx->error = X509_V_ERR_UNSPECIFIED;
else if (ret == 0)
ctx->error = X509_V_ERR_EC_KEY_EXPLICIT_PARAMS;
}
if ((x->ex_flags & EXFLAG_CA) == 0
&& x->ex_pathlen != -1
&& (ctx->param->flags & X509_V_FLAG_X509_STRICT)) {
@ -1699,6 +1726,7 @@ int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int depth)
return 1;
}
/* verify the issuer signatures and cert times of ctx->chain */
static int internal_verify(X509_STORE_CTX *ctx)
{
int n = sk_X509_num(ctx->chain) - 1;
@ -1713,19 +1741,25 @@ static int internal_verify(X509_STORE_CTX *ctx)
if (ctx->bare_ta_signed) {
xs = xi;
xi = NULL;
goto check_cert;
goto check_cert_time;
}
if (ctx->check_issued(ctx, xi, xi))
xs = xi;
xs = xi; /* the typical case: last cert in the chain is self-issued */
else {
if (ctx->param->flags & X509_V_FLAG_PARTIAL_CHAIN) {
xs = xi;
goto check_cert;
goto check_cert_time;
}
if (n <= 0)
return verify_cb_cert(ctx, xi, 0,
X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE);
if (n <= 0) {
if (!verify_cb_cert(ctx, xi, 0,
X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE))
return 0;
xs = xi;
goto check_cert_time;
}
n--;
ctx->error_depth = n;
xs = sk_X509_value(ctx->chain, n);
@ -1736,27 +1770,55 @@ static int internal_verify(X509_STORE_CTX *ctx)
* is allowed to reset errors (at its own peril).
*/
while (n >= 0) {
EVP_PKEY *pkey;
/*
* Skip signature check for self signed certificates unless explicitly
* asked for. It doesn't add any security and just wastes time. If
* the issuer's public key is unusable, report the issuer certificate
* and its depth (rather than the depth of the subject).
* For each iteration of this loop:
* n is the subject depth
* xs is the subject cert, for which the signature is to be checked
* xi is the supposed issuer cert containing the public key to use
* Initially xs == xi if the last cert in the chain is self-issued.
*
* Skip signature check for self-signed certificates unless explicitly
* asked for because it does not add any security and just wastes time.
*/
if (xs != xi || (ctx->param->flags & X509_V_FLAG_CHECK_SS_SIGNATURE)) {
if (xs != xi || ((ctx->param->flags & X509_V_FLAG_CHECK_SS_SIGNATURE)
&& (xi->ex_flags & EXFLAG_SS) != 0)) {
EVP_PKEY *pkey;
/*
* If the issuer's public key is not available or its key usage
* does not support issuing the subject cert, report the issuer
* cert and its depth (rather than n, the depth of the subject).
*/
int issuer_depth = n + (xs == xi ? 0 : 1);
/*
* According to https://tools.ietf.org/html/rfc5280#section-6.1.4
* step (n) we must check any given key usage extension in a CA cert
* when preparing the verification of a certificate issued by it.
* According to https://tools.ietf.org/html/rfc5280#section-4.2.1.3
* we must not verify a certifiate signature if the key usage of the
* CA certificate that issued the certificate prohibits signing.
* In case the 'issuing' certificate is the last in the chain and is
* not a CA certificate but a 'self-issued' end-entity cert (i.e.,
* xs == xi && !(xi->ex_flags & EXFLAG_CA)) RFC 5280 does not apply
* (see https://tools.ietf.org/html/rfc6818#section-2) and thus
* we are free to ignore any key usage restrictions on such certs.
*/
int ret = xs == xi && (xi->ex_flags & EXFLAG_CA) == 0
? X509_V_OK : x509_signing_allowed(xi, xs);
if (ret != X509_V_OK && !verify_cb_cert(ctx, xi, issuer_depth, ret))
return 0;
if ((pkey = X509_get0_pubkey(xi)) == NULL) {
if (!verify_cb_cert(ctx, xi, xi != xs ? n+1 : n,
X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY))
ret = X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY;
if (!verify_cb_cert(ctx, xi, issuer_depth, ret))
return 0;
} else if (X509_verify(xs, pkey) <= 0) {
if (!verify_cb_cert(ctx, xs, n,
X509_V_ERR_CERT_SIGNATURE_FAILURE))
ret = X509_V_ERR_CERT_SIGNATURE_FAILURE;
if (!verify_cb_cert(ctx, xs, n, ret))
return 0;
}
}
check_cert:
check_cert_time: /* in addition to RFC 5280, do also for trusted (root) cert */
/* Calls verify callback as needed */
if (!x509_check_cert_time(ctx, xs, n))
return 0;
@ -3158,7 +3220,16 @@ static int build_chain(X509_STORE_CTX *ctx)
/* Drop this issuer from future consideration */
(void) sk_X509_delete_ptr(sktmp, xtmp);
if (!X509_up_ref(xtmp)) {
X509err(X509_F_BUILD_CHAIN, ERR_R_INTERNAL_ERROR);
trust = X509_TRUST_REJECTED;
ctx->error = X509_V_ERR_UNSPECIFIED;
search = 0;
continue;
}
if (!sk_X509_push(ctx->chain, xtmp)) {
X509_free(xtmp);
X509err(X509_F_BUILD_CHAIN, ERR_R_MALLOC_FAILURE);
trust = X509_TRUST_REJECTED;
ctx->error = X509_V_ERR_OUT_OF_MEM;
@ -3166,7 +3237,7 @@ static int build_chain(X509_STORE_CTX *ctx)
continue;
}
X509_up_ref(x = xtmp);
x = xtmp;
++ctx->num_untrusted;
ss = cert_self_signed(xtmp);
@ -3257,6 +3328,32 @@ static int check_key_level(X509_STORE_CTX *ctx, X509 *cert)
return EVP_PKEY_security_bits(pkey) >= minbits_table[level - 1];
}
/*
* Check whether the public key of ``cert`` does not use explicit params
* for an elliptic curve.
*
* Returns 1 on success, 0 if check fails, -1 for other errors.
*/
static int check_curve(X509 *cert)
{
#ifndef OPENSSL_NO_EC
EVP_PKEY *pkey = X509_get0_pubkey(cert);
/* Unsupported or malformed key */
if (pkey == NULL)
return -1;
if (EVP_PKEY_id(pkey) == EVP_PKEY_EC) {
int ret;
ret = EC_KEY_decoded_from_explicit_params(EVP_PKEY_get0_EC_KEY(pkey));
return ret < 0 ? ret : !ret;
}
#endif
return 1;
}
/*
* Check whether the signature digest algorithm of ``cert`` meets the security
* level of ``ctx``. Should not be checked for trust anchors (whether

View File

@ -308,7 +308,7 @@ extern FILE *_imp___iob;
# if defined(OPENSSL_SYS_WINDOWS)
# define strcasecmp _stricmp
# define strncasecmp _strnicmp
# if (_MSC_VER >= 1310)
# if (_MSC_VER >= 1310) && !defined(_WIN32_WCE)
# define open _open
# define fdopen _fdopen
# define close _close

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
@ -56,7 +56,7 @@ extern "C" {
* avoid leaking exponent information through timing,
* BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
* BN_div() will call BN_div_no_branch,
* BN_mod_inverse() will call BN_mod_inverse_no_branch.
* BN_mod_inverse() will call bn_mod_inverse_no_branch.
*/
# define BN_FLG_CONSTTIME 0x04
# define BN_FLG_SECURE 0x08

View File

@ -4072,9 +4072,10 @@ const SSL_CIPHER *ssl3_get_cipher_by_id(uint32_t id)
const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname)
{
SSL_CIPHER *c = NULL, *tbl;
SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers};
size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS};
SSL_CIPHER *tbl;
SSL_CIPHER *alltabs[] = {tls13_ciphers, ssl3_ciphers, ssl3_scsvs};
size_t i, j, tblsize[] = {TLS13_NUM_CIPHERS, SSL3_NUM_CIPHERS,
SSL3_NUM_SCSVS};
/* this is not efficient, necessary to optimize this? */
for (j = 0; j < OSSL_NELEM(alltabs); j++) {
@ -4082,21 +4083,11 @@ const SSL_CIPHER *ssl3_get_cipher_by_std_name(const char *stdname)
if (tbl->stdname == NULL)
continue;
if (strcmp(stdname, tbl->stdname) == 0) {
c = tbl;
break;
return tbl;
}
}
}
if (c == NULL) {
tbl = ssl3_scsvs;
for (i = 0; i < SSL3_NUM_SCSVS; i++, tbl++) {
if (strcmp(stdname, tbl->stdname) == 0) {
c = tbl;
break;
}
}
}
return c;
return NULL;
}
/*

View File

@ -1200,6 +1200,8 @@ void SSL_free(SSL *s)
OPENSSL_free(s->ext.ocsp.resp);
OPENSSL_free(s->ext.alpn);
OPENSSL_free(s->ext.tls13_cookie);
if (s->clienthello != NULL)
OPENSSL_free(s->clienthello->pre_proc_exts);
OPENSSL_free(s->clienthello);
OPENSSL_free(s->pha_context);
EVP_MD_CTX_free(s->pha_dgst);
@ -2676,7 +2678,7 @@ const char *SSL_get_servername(const SSL *s, const int type)
* - Otherwise it returns NULL
*
* During/after the handshake (TLSv1.2 or below resumption occurred):
* - If the session from the orignal handshake had a servername accepted
* - If the session from the original handshake had a servername accepted
* by the server then it will return that servername.
* - Otherwise it returns the servername set via
* SSL_set_tlsext_host_name() (or NULL if it was not called).
@ -2895,7 +2897,8 @@ int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
const unsigned char *context, size_t contextlen,
int use_context)
{
if (s->version < TLS1_VERSION && s->version != DTLS1_BAD_VER)
if (s->session == NULL
|| (s->version < TLS1_VERSION && s->version != DTLS1_BAD_VER))
return -1;
return s->method->ssl3_enc->export_keying_material(s, out, olen, label,
@ -3824,6 +3827,8 @@ SSL *SSL_dup(SSL *s)
goto err;
ret->version = s->version;
ret->options = s->options;
ret->min_proto_version = s->min_proto_version;
ret->max_proto_version = s->max_proto_version;
ret->mode = s->mode;
SSL_set_max_cert_list(ret, SSL_get_max_cert_list(s));
SSL_set_read_ahead(ret, SSL_get_read_ahead(s));
@ -3839,21 +3844,6 @@ SSL *SSL_dup(SSL *s)
if (!CRYPTO_dup_ex_data(CRYPTO_EX_INDEX_SSL, &ret->ex_data, &s->ex_data))
goto err;
/* setup rbio, and wbio */
if (s->rbio != NULL) {
if (!BIO_dup_state(s->rbio, (char *)&ret->rbio))
goto err;
}
if (s->wbio != NULL) {
if (s->wbio != s->rbio) {
if (!BIO_dup_state(s->wbio, (char *)&ret->wbio))
goto err;
} else {
BIO_up_ref(ret->rbio);
ret->wbio = ret->rbio;
}
}
ret->server = s->server;
if (s->handshake_func) {
if (s->server)

View File

@ -1,5 +1,5 @@
/*
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2005 Nokia. All rights reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
@ -107,7 +107,7 @@ SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket)
{
SSL_SESSION *dest;
dest = OPENSSL_malloc(sizeof(*src));
dest = OPENSSL_malloc(sizeof(*dest));
if (dest == NULL) {
goto err;
}

View File

@ -2439,46 +2439,48 @@ int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain)
#ifndef OPENSSL_NO_DH
DH *ssl_get_auto_dh(SSL *s)
{
DH *dhp = NULL;
BIGNUM *p = NULL, *g = NULL;
int dh_secbits = 80;
if (s->cert->dh_tmp_auto == 2)
return DH_get_1024_160();
if (s->s3->tmp.new_cipher->algorithm_auth & (SSL_aNULL | SSL_aPSK)) {
if (s->s3->tmp.new_cipher->strength_bits == 256)
dh_secbits = 128;
else
dh_secbits = 80;
} else {
if (s->s3->tmp.cert == NULL)
return NULL;
dh_secbits = EVP_PKEY_security_bits(s->s3->tmp.cert->privatekey);
if (s->cert->dh_tmp_auto != 2) {
if (s->s3->tmp.new_cipher->algorithm_auth & (SSL_aNULL | SSL_aPSK)) {
if (s->s3->tmp.new_cipher->strength_bits == 256)
dh_secbits = 128;
else
dh_secbits = 80;
} else {
if (s->s3->tmp.cert == NULL)
return NULL;
dh_secbits = EVP_PKEY_security_bits(s->s3->tmp.cert->privatekey);
}
}
if (dh_secbits >= 128) {
DH *dhp = DH_new();
BIGNUM *p, *g;
if (dhp == NULL)
return NULL;
g = BN_new();
if (g == NULL || !BN_set_word(g, 2)) {
DH_free(dhp);
BN_free(g);
return NULL;
}
if (dh_secbits >= 192)
p = BN_get_rfc3526_prime_8192(NULL);
else
p = BN_get_rfc3526_prime_3072(NULL);
if (p == NULL || !DH_set0_pqg(dhp, p, NULL, g)) {
DH_free(dhp);
BN_free(p);
BN_free(g);
return NULL;
}
return dhp;
dhp = DH_new();
if (dhp == NULL)
return NULL;
g = BN_new();
if (g == NULL || !BN_set_word(g, 2)) {
DH_free(dhp);
BN_free(g);
return NULL;
}
if (dh_secbits >= 112)
return DH_get_2048_224();
return DH_get_1024_160();
if (dh_secbits >= 192)
p = BN_get_rfc3526_prime_8192(NULL);
else if (dh_secbits >= 152)
p = BN_get_rfc3526_prime_4096(NULL);
else if (dh_secbits >= 128)
p = BN_get_rfc3526_prime_3072(NULL);
else if (dh_secbits >= 112)
p = BN_get_rfc3526_prime_2048(NULL);
else
p = BN_get_rfc2409_prime_1024(NULL);
if (p == NULL || !DH_set0_pqg(dhp, p, NULL, g)) {
DH_free(dhp);
BN_free(p);
BN_free(g);
return NULL;
}
return dhp;
}
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright 2001-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
@ -2099,6 +2099,87 @@ static int ec_point_hex2point_test(int id)
return ret;
}
/*
* check the EC_METHOD respects the supplied EC_GROUP_set_generator G
*/
static int custom_generator_test(int id)
{
int ret = 0, nid, bsize;
EC_GROUP *group = NULL;
EC_POINT *G2 = NULL, *Q1 = NULL, *Q2 = NULL;
BN_CTX *ctx = NULL;
BIGNUM *k = NULL;
unsigned char *b1 = NULL, *b2 = NULL;
/* Do some setup */
nid = curves[id].nid;
TEST_note("Curve %s", OBJ_nid2sn(nid));
if (!TEST_ptr(ctx = BN_CTX_new()))
return 0;
BN_CTX_start(ctx);
if (!TEST_ptr(group = EC_GROUP_new_by_curve_name(nid)))
goto err;
/* expected byte length of encoded points */
bsize = (EC_GROUP_get_degree(group) + 7) / 8;
bsize = 2 * bsize + 1;
if (!TEST_ptr(k = BN_CTX_get(ctx))
/* fetch a testing scalar k != 0,1 */
|| !TEST_true(BN_rand(k, EC_GROUP_order_bits(group) - 1,
BN_RAND_TOP_ONE, BN_RAND_BOTTOM_ANY))
/* make k even */
|| !TEST_true(BN_clear_bit(k, 0))
|| !TEST_ptr(G2 = EC_POINT_new(group))
|| !TEST_ptr(Q1 = EC_POINT_new(group))
/* Q1 := kG */
|| !TEST_true(EC_POINT_mul(group, Q1, k, NULL, NULL, ctx))
/* pull out the bytes of that */
|| !TEST_int_eq(EC_POINT_point2oct(group, Q1,
POINT_CONVERSION_UNCOMPRESSED, NULL,
0, ctx), bsize)
|| !TEST_ptr(b1 = OPENSSL_malloc(bsize))
|| !TEST_int_eq(EC_POINT_point2oct(group, Q1,
POINT_CONVERSION_UNCOMPRESSED, b1,
bsize, ctx), bsize)
/* new generator is G2 := 2G */
|| !TEST_true(EC_POINT_dbl(group, G2, EC_GROUP_get0_generator(group),
ctx))
|| !TEST_true(EC_GROUP_set_generator(group, G2,
EC_GROUP_get0_order(group),
EC_GROUP_get0_cofactor(group)))
|| !TEST_ptr(Q2 = EC_POINT_new(group))
|| !TEST_true(BN_rshift1(k, k))
/* Q2 := k/2 G2 */
|| !TEST_true(EC_POINT_mul(group, Q2, k, NULL, NULL, ctx))
|| !TEST_int_eq(EC_POINT_point2oct(group, Q2,
POINT_CONVERSION_UNCOMPRESSED, NULL,
0, ctx), bsize)
|| !TEST_ptr(b2 = OPENSSL_malloc(bsize))
|| !TEST_int_eq(EC_POINT_point2oct(group, Q2,
POINT_CONVERSION_UNCOMPRESSED, b2,
bsize, ctx), bsize)
/* Q1 = kG = k/2 G2 = Q2 should hold */
|| !TEST_int_eq(CRYPTO_memcmp(b1, b2, bsize), 0))
goto err;
ret = 1;
err:
BN_CTX_end(ctx);
EC_POINT_free(Q1);
EC_POINT_free(Q2);
EC_POINT_free(G2);
EC_GROUP_free(group);
BN_CTX_free(ctx);
OPENSSL_free(b1);
OPENSSL_free(b2);
return ret;
}
#endif /* OPENSSL_NO_EC */
int setup_tests(void)
@ -2126,6 +2207,7 @@ int setup_tests(void)
ADD_ALL_TESTS(check_named_curve_from_ecparameters, crv_len);
ADD_ALL_TESTS(ec_point_hex2point_test, crv_len);
ADD_ALL_TESTS(custom_generator_test, crv_len);
#endif /* OPENSSL_NO_EC */
return 1;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved.
* Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@ -223,18 +223,20 @@ static int pad_unknown(void)
static int rsa_setkey(RSA** key, unsigned char* ctext, int idx)
{
int clen = 0;
*key = RSA_new();
switch (idx) {
case 0:
clen = key1(*key, ctext);
break;
case 1:
clen = key2(*key, ctext);
break;
case 2:
clen = key3(*key, ctext);
break;
}
if (*key != NULL)
switch (idx) {
case 0:
clen = key1(*key, ctext);
break;
case 1:
clen = key2(*key, ctext);
break;
case 2:
clen = key3(*key, ctext);
break;
}
return clen;
}

View File

@ -108,7 +108,12 @@ aes_v8_set_encrypt_key:
vtbl.8 d20,{q8},d4
vtbl.8 d21,{q8},d5
vext.8 q9,q0,q3,#12
#ifdef __ARMEB__
vst1.32 {q8},[r2]!
sub r2,r2,#8
#else
vst1.32 {d16},[r2]!
#endif
.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
subs r1,r1,#1
@ -580,8 +585,11 @@ aes_v8_ctr32_encrypt_blocks:
ldr r5,[r3,#240]
ldr r8, [r4, #12]
#ifdef __ARMEB__
vld1.8 {q0},[r4]
#else
vld1.32 {q0},[r4]
#endif
vld1.32 {q8,q9},[r3] @ load key schedule...
sub r5,r5,#4
mov r12,#16
@ -597,17 +605,17 @@ aes_v8_ctr32_encrypt_blocks:
#ifndef __ARMEB__
rev r8, r8
#endif
vorr q1,q0,q0
add r10, r8, #1
vorr q10,q0,q0
add r8, r8, #2
vorr q6,q0,q0
rev r10, r10
vmov.32 d3[1],r10
vmov.32 d13[1],r10
add r8, r8, #2
vorr q1,q6,q6
bls .Lctr32_tail
rev r12, r8
vmov.32 d13[1],r12
sub r2,r2,#3 @ bias
vmov.32 d21[1],r12
vorr q10,q6,q6
b .Loop3x_ctr32
.align 4
@ -634,11 +642,11 @@ aes_v8_ctr32_encrypt_blocks:
.byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8
.byte 0x82,0xa3,0xb0,0xf3 @ aesmc q5,q1
vld1.8 {q2},[r0]!
vorr q0,q6,q6
add r9,r8,#1
.byte 0x20,0x43,0xf0,0xf3 @ aese q10,q8
.byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10
vld1.8 {q3},[r0]!
vorr q1,q6,q6
rev r9,r9
.byte 0x22,0x83,0xb0,0xf3 @ aese q4,q9
.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
.byte 0x22,0xa3,0xb0,0xf3 @ aese q5,q9
@ -647,8 +655,6 @@ aes_v8_ctr32_encrypt_blocks:
mov r7,r3
.byte 0x22,0x43,0xf0,0xf3 @ aese q10,q9
.byte 0xa4,0x23,0xf0,0xf3 @ aesmc q9,q10
vorr q10,q6,q6
add r9,r8,#1
.byte 0x28,0x83,0xb0,0xf3 @ aese q4,q12
.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
.byte 0x28,0xa3,0xb0,0xf3 @ aese q5,q12
@ -664,20 +670,22 @@ aes_v8_ctr32_encrypt_blocks:
.byte 0x2a,0xa3,0xb0,0xf3 @ aese q5,q13
.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
veor q11,q11,q7
rev r9,r9
vmov.32 d13[1], r9
.byte 0x2a,0x23,0xf0,0xf3 @ aese q9,q13
.byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9
vmov.32 d1[1], r9
vorr q0,q6,q6
rev r10,r10
.byte 0x2c,0x83,0xb0,0xf3 @ aese q4,q14
.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
vmov.32 d13[1], r10
rev r12,r8
.byte 0x2c,0xa3,0xb0,0xf3 @ aese q5,q14
.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
vmov.32 d3[1], r10
rev r12,r8
vorr q1,q6,q6
vmov.32 d13[1], r12
.byte 0x2c,0x23,0xf0,0xf3 @ aese q9,q14
.byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9
vmov.32 d21[1], r12
vorr q10,q6,q6
subs r2,r2,#3
.byte 0x2e,0x83,0xb0,0xf3 @ aese q4,q15
.byte 0x2e,0xa3,0xb0,0xf3 @ aese q5,q15

View File

@ -3,6 +3,7 @@
.text
.hidden OPENSSL_armcap_P
.align 5
.Lsigma:

View File

@ -4,10 +4,14 @@
// forward "declarations" are required for Apple
.globl poly1305_blocks
.globl poly1305_emit
.hidden OPENSSL_armcap_P
.globl poly1305_init
.hidden poly1305_init
.globl poly1305_blocks
.hidden poly1305_blocks
.globl poly1305_emit
.hidden poly1305_emit
.type poly1305_init,%function
.align 5
poly1305_init:
@ -795,8 +799,8 @@ poly1305_blocks_neon:
st1 {v23.s}[0],[x0]
.Lno_data_neon:
.inst 0xd50323bf // autiasp
ldr x29,[sp],#80
.inst 0xd50323bf // autiasp
ret
.size poly1305_blocks_neon,.-poly1305_blocks_neon

View File

@ -3,6 +3,7 @@
.text
.hidden OPENSSL_armcap_P
.globl sha1_block_data_order
.type sha1_block_data_order,%function
.align 6
@ -1218,4 +1219,3 @@ sha1_block_armv8:
.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
.align 2
.align 2
.comm OPENSSL_armcap_P,4,4

View File

@ -59,6 +59,7 @@
.text
.hidden OPENSSL_armcap_P
.globl sha256_block_data_order
.type sha256_block_data_order,%function
.align 6
@ -2060,6 +2061,3 @@ sha256_block_neon:
add sp,sp,#16*4+16
ret
.size sha256_block_neon,.-sha256_block_neon
#ifndef __KERNEL__
.comm OPENSSL_armcap_P,4,4
#endif

View File

@ -109,7 +109,12 @@ aes_v8_set_encrypt_key:
vtbl.8 d20,{q8},d4
vtbl.8 d21,{q8},d5
vext.8 q9,q0,q3,#12
#ifdef __ARMEB__
vst1.32 {q8},[r2]!
sub r2,r2,#8
#else
vst1.32 {d16},[r2]!
#endif
.byte 0x00,0x43,0xf0,0xf3 @ aese q10,q0
subs r1,r1,#1
@ -581,8 +586,11 @@ aes_v8_ctr32_encrypt_blocks:
ldr r5,[r3,#240]
ldr r8, [r4, #12]
#ifdef __ARMEB__
vld1.8 {q0},[r4]
#else
vld1.32 {q0},[r4]
#endif
vld1.32 {q8,q9},[r3] @ load key schedule...
sub r5,r5,#4
mov r12,#16
@ -598,17 +606,17 @@ aes_v8_ctr32_encrypt_blocks:
#ifndef __ARMEB__
rev r8, r8
#endif
vorr q1,q0,q0
add r10, r8, #1
vorr q10,q0,q0
add r8, r8, #2
vorr q6,q0,q0
rev r10, r10
vmov.32 d3[1],r10
vmov.32 d13[1],r10
add r8, r8, #2
vorr q1,q6,q6
bls .Lctr32_tail
rev r12, r8
vmov.32 d13[1],r12
sub r2,r2,#3 @ bias
vmov.32 d21[1],r12
vorr q10,q6,q6
b .Loop3x_ctr32
.align 4
@ -635,11 +643,11 @@ aes_v8_ctr32_encrypt_blocks:
.byte 0x20,0x23,0xb0,0xf3 @ aese q1,q8
.byte 0x82,0xa3,0xb0,0xf3 @ aesmc q5,q1
vld1.8 {q2},[r0]!
vorr q0,q6,q6
add r9,r8,#1
.byte 0x20,0x43,0xf0,0xf3 @ aese q10,q8
.byte 0xa4,0x43,0xf0,0xf3 @ aesmc q10,q10
vld1.8 {q3},[r0]!
vorr q1,q6,q6
rev r9,r9
.byte 0x22,0x83,0xb0,0xf3 @ aese q4,q9
.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
.byte 0x22,0xa3,0xb0,0xf3 @ aese q5,q9
@ -648,8 +656,6 @@ aes_v8_ctr32_encrypt_blocks:
mov r7,r3
.byte 0x22,0x43,0xf0,0xf3 @ aese q10,q9
.byte 0xa4,0x23,0xf0,0xf3 @ aesmc q9,q10
vorr q10,q6,q6
add r9,r8,#1
.byte 0x28,0x83,0xb0,0xf3 @ aese q4,q12
.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
.byte 0x28,0xa3,0xb0,0xf3 @ aese q5,q12
@ -665,20 +671,22 @@ aes_v8_ctr32_encrypt_blocks:
.byte 0x2a,0xa3,0xb0,0xf3 @ aese q5,q13
.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
veor q11,q11,q7
rev r9,r9
vmov.32 d13[1], r9
.byte 0x2a,0x23,0xf0,0xf3 @ aese q9,q13
.byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9
vmov.32 d1[1], r9
vorr q0,q6,q6
rev r10,r10
.byte 0x2c,0x83,0xb0,0xf3 @ aese q4,q14
.byte 0x88,0x83,0xb0,0xf3 @ aesmc q4,q4
vmov.32 d13[1], r10
rev r12,r8
.byte 0x2c,0xa3,0xb0,0xf3 @ aese q5,q14
.byte 0x8a,0xa3,0xb0,0xf3 @ aesmc q5,q5
vmov.32 d3[1], r10
rev r12,r8
vorr q1,q6,q6
vmov.32 d13[1], r12
.byte 0x2c,0x23,0xf0,0xf3 @ aese q9,q14
.byte 0xa2,0x23,0xf0,0xf3 @ aesmc q9,q9
vmov.32 d21[1], r12
vorr q10,q6,q6
subs r2,r2,#3
.byte 0x2e,0x83,0xb0,0xf3 @ aese q4,q15
.byte 0x2e,0xa3,0xb0,0xf3 @ aese q5,q15

View File

@ -4,6 +4,7 @@
.text
.hidden OPENSSL_armcap_P
.align 5
.Lsigma:

View File

@ -3851,9 +3851,9 @@ ecp_nistz256_point_add:
ldr r14,[sp,#32*18+12] @ ~is_equal(S1,S2)
mvn r10,r10 @ -1/0 -> 0/-1
mvn r12,r12 @ -1/0 -> 0/-1
orr r11,r10
orr r11,r12
orrs r11,r14 @ set flags
orr r11,r11,r10
orr r11,r11,r12
orrs r11,r11,r14 @ set flags
@ if(~is_equal(U1,U2) | in1infty | in2infty | ~is_equal(S1,S2))
bne .Ladd_proceed

View File

@ -5,10 +5,14 @@
// forward "declarations" are required for Apple
.globl poly1305_blocks
.globl poly1305_emit
.hidden OPENSSL_armcap_P
.globl poly1305_init
.hidden poly1305_init
.globl poly1305_blocks
.hidden poly1305_blocks
.globl poly1305_emit
.hidden poly1305_emit
.type poly1305_init,%function
.align 5
poly1305_init:
@ -796,8 +800,8 @@ poly1305_blocks_neon:
st1 {v23.s}[0],[x0]
.Lno_data_neon:
.inst 0xd50323bf // autiasp
ldr x29,[sp],#80
.inst 0xd50323bf // autiasp
ret
.size poly1305_blocks_neon,.-poly1305_blocks_neon

View File

@ -4,6 +4,7 @@
.text
.hidden OPENSSL_armcap_P
.globl sha1_block_data_order
.type sha1_block_data_order,%function
.align 6
@ -1219,4 +1220,3 @@ sha1_block_armv8:
.byte 83,72,65,49,32,98,108,111,99,107,32,116,114,97,110,115,102,111,114,109,32,102,111,114,32,65,82,77,118,56,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
.align 2
.align 2
.comm OPENSSL_armcap_P,4,4

View File

@ -60,6 +60,7 @@
.text
.hidden OPENSSL_armcap_P
.globl sha256_block_data_order
.type sha256_block_data_order,%function
.align 6
@ -2061,6 +2062,3 @@ sha256_block_neon:
add sp,sp,#16*4+16
ret
.size sha256_block_neon,.-sha256_block_neon
#ifndef __KERNEL__
.comm OPENSSL_armcap_P,4,4
#endif

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ADMISSIONS.3,v 1.2 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ADMISSIONS.3,v 1.3 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ADMISSIONS 3"
.TH ADMISSIONS 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ADMISSIONS 3 "2020-01-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -271,7 +271,7 @@ The
functions free any existing value and set the pointer to the specified value.
.PP
The \fB\s-1ADMISSION\s0\fR type has an authority name, authority object, and a
stack of \fB\s-1PROFSSION_INFO\s0\fR items.
stack of \fB\s-1PROFESSION_INFO\s0\fR items.
The \fBADMISSIONS_get0_admissionAuthority()\fR, \fBADMISSIONS_get0_namingAuthority()\fR,
and \fBADMISSIONS_get0_professionInfos()\fR
functions return pointers to those values within the object.
@ -307,7 +307,7 @@ structure and must not be freed.
\&\fBd2i_X509\fR\|(3),
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2017\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2017\-2019 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_INTEGER_get_int64.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_INTEGER_get_int64.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_INTEGER_get_int64 3"
.TH ASN1_INTEGER_get_int64 3 "2019-03-12" "1.1.1c" "OpenSSL"
.TH ASN1_INTEGER_get_int64 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -163,10 +163,10 @@ libcrypto, -lcrypto
\& ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
\& BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
\&
\& int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_INTEGER *a);
\& int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
\& long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
\&
\& int ASN1_ENUMERATED_set_int64(ASN1_INTEGER *a, int64_t r);
\& int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
\& int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
\&
\& ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(BIGNUM *bn, ASN1_ENUMERATED *ai);
@ -221,7 +221,7 @@ instead.
.IX Header "NOTES"
In general an \fB\s-1ASN1_INTEGER\s0\fR or \fB\s-1ASN1_ENUMERATED\s0\fR type can contain an
integer of almost arbitrary size and so cannot always be represented by a C
\&\fBint64_t\fR type. However in many cases (for example version numbers) they
\&\fBint64_t\fR type. However, in many cases (for example version numbers) they
represent small integers which can be more easily manipulated if converted to
an appropriate C integer type.
.SH "BUGS"
@ -258,7 +258,7 @@ of \s-1NULL\s0 if an error occurs. They can fail if the passed type is incorrect
were added in OpenSSL 1.1.0.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2015\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2015\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_ITEM_lookup.3,v 1.2 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_ITEM_lookup.3,v 1.3 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_ITEM_lookup 3"
.TH ASN1_ITEM_lookup 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ASN1_ITEM_lookup 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_OBJECT_new.3,v 1.19 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_OBJECT_new.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_OBJECT_new 3"
.TH ASN1_OBJECT_new 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ASN1_OBJECT_new 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_STRING_TABLE_add.3,v 1.2 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_STRING_TABLE_add.3,v 1.3 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_STRING_TABLE_add 3"
.TH ASN1_STRING_TABLE_add 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ASN1_STRING_TABLE_add 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_STRING_length.3,v 1.19 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_STRING_length.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_STRING_length 3"
.TH ASN1_STRING_length 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ASN1_STRING_length 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -212,7 +212,7 @@ In general it cannot be assumed that the data returned by \fBASN1_STRING_data()\
is null terminated or does not contain embedded nulls. The actual format
of the data will depend on the actual string type itself: for example
for an IA5String the data will be \s-1ASCII,\s0 for a BMPString two bytes per
character in big endian format, and for an UTF8String it will be in \s-1UTF8\s0 format.
character in big endian format, and for a UTF8String it will be in \s-1UTF8\s0 format.
.PP
Similar care should be take to ensure the data is in the correct format
when calling \fBASN1_STRING_set()\fR.
@ -240,7 +240,7 @@ negative value if an error occurred.
\&\fBERR_get_error\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2002\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2002\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_STRING_new.3,v 1.19 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_STRING_new.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_STRING_new 3"
.TH ASN1_STRING_new 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ASN1_STRING_new 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_STRING_print_ex.3,v 1.19 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_STRING_print_ex.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_STRING_print_ex 3"
.TH ASN1_STRING_print_ex 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ASN1_STRING_print_ex 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_TIME_set.3,v 1.4 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_TIME_set.3,v 1.5 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_TIME_set 3"
.TH ASN1_TIME_set 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH ASN1_TIME_set 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -258,7 +258,7 @@ one or both (depending on the time difference) of \fB*pday\fR and \fB*psec\fR
will be positive. If \fBto\fR represents a time earlier than \fBfrom\fR then
one or both of \fB*pday\fR and \fB*psec\fR will be negative. If \fBto\fR and \fBfrom\fR
represent the same time then \fB*pday\fR and \fB*psec\fR will both be zero.
If both \fB*pday\fR and \fB*psec\fR are non-zero they will always have the same
If both \fB*pday\fR and \fB*psec\fR are nonzero they will always have the same
sign. The value of \fB*psec\fR will always be less than the number of seconds
in a day. If \fBfrom\fR or \fBto\fR is \s-1NULL\s0 the current time is used.
.PP
@ -306,7 +306,7 @@ format.
.SH "BUGS"
.IX Header "BUGS"
\&\fBASN1_TIME_print()\fR, \fBASN1_UTCTIME_print()\fR and \fBASN1_GENERALIZEDTIME_print()\fR
do not print out the time zone: it either prints out \*(L"\s-1GMT\*(R"\s0 or nothing. But all
do not print out the timezone: it either prints out \*(L"\s-1GMT\*(R"\s0 or nothing. But all
certificates complying with \s-1RFC5280\s0 et al use \s-1GMT\s0 anyway.
.PP
Use the \fBASN1_TIME_normalize()\fR function to normalize the time value before
@ -387,7 +387,7 @@ The \fBASN1_TIME_cmp_time_t()\fR function was added in OpenSSL 1.1.1.
The \fBASN1_TIME_compare()\fR function was added in OpenSSL 1.1.1.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2015\-2019 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2015\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_TYPE_get.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_TYPE_get.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_TYPE_get 3"
.TH ASN1_TYPE_get 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH ASN1_TYPE_get 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -174,7 +174,7 @@ up after the call.
\&\fBASN1_TYPE_set1()\fR sets the value of \fBa\fR to \fBtype\fR a copy of \fBvalue\fR.
.PP
\&\fBASN1_TYPE_cmp()\fR compares \s-1ASN.1\s0 types \fBa\fR and \fBb\fR and returns 0 if
they are identical and non-zero otherwise.
they are identical and nonzero otherwise.
.PP
\&\fBASN1_TYPE_unpack_sequence()\fR attempts to parse the \s-1SEQUENCE\s0 present in
\&\fBt\fR using the \s-1ASN.1\s0 structure \fBit\fR. If successful it returns a pointer
@ -202,14 +202,14 @@ length octets).
.PP
\&\fBASN1_TYPE_cmp()\fR may not return zero if two types are equivalent but have
different encodings. For example the single content octet of the boolean \s-1TRUE\s0
value under \s-1BER\s0 can have any non-zero encoding but \fBASN1_TYPE_cmp()\fR will
value under \s-1BER\s0 can have any nonzero encoding but \fBASN1_TYPE_cmp()\fR will
only return zero if the values are the same.
.PP
If either or both of the parameters passed to \fBASN1_TYPE_cmp()\fR is \s-1NULL\s0 the
return value is non-zero. Technically if both parameters are \s-1NULL\s0 the two
types could be absent \s-1OPTIONAL\s0 fields and so should match, however passing
return value is nonzero. Technically if both parameters are \s-1NULL\s0 the two
types could be absent \s-1OPTIONAL\s0 fields and so should match, however, passing
\&\s-1NULL\s0 values could also indicate a programming error (for example an
unparseable type which returns \s-1NULL\s0) for types which do \fBnot\fR match. So
unparsable type which returns \s-1NULL\s0) for types which do \fBnot\fR match. So
applications should handle the case of two absent values separately.
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
@ -219,7 +219,7 @@ applications should handle the case of two absent values separately.
.PP
\&\fBASN1_TYPE_set1()\fR returns 1 for success and 0 for failure.
.PP
\&\fBASN1_TYPE_cmp()\fR returns 0 if the types are identical and non-zero otherwise.
\&\fBASN1_TYPE_cmp()\fR returns 0 if the types are identical and nonzero otherwise.
.PP
\&\fBASN1_TYPE_unpack_sequence()\fR returns a pointer to an \s-1ASN.1\s0 structure or
\&\s-1NULL\s0 on failure.
@ -228,7 +228,7 @@ applications should handle the case of two absent values separately.
\&\s-1NULL\s0 on failure.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2015\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2015\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASN1_generate_nconf.3,v 1.19 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASN1_generate_nconf.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASN1_generate_nconf 3"
.TH ASN1_generate_nconf 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH ASN1_generate_nconf 3 "2019-06-09" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASYNC_WAIT_CTX_new.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASYNC_WAIT_CTX_new.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASYNC_WAIT_CTX_new 3"
.TH ASYNC_WAIT_CTX_new 3 "2019-03-12" "1.1.1c" "OpenSSL"
.TH ASYNC_WAIT_CTX_new 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -190,7 +190,7 @@ job in \fB*fd\fR. The number of file descriptors returned will be stored in
\&\fB*numfds\fR. It is the caller's responsibility to ensure that sufficient memory
has been allocated in \fB*fd\fR to receive all the file descriptors. Calling
\&\fBASYNC_WAIT_CTX_get_all_fds()\fR with a \s-1NULL\s0 \fBfd\fR value will return no file
descriptors but will still populate \fB*numfds\fR. Therefore application code is
descriptors but will still populate \fB*numfds\fR. Therefore, application code is
typically expected to call this function twice: once to get the number of fds,
and then again when sufficient memory has been allocated. If only one
asynchronous engine is being used then normally this call will only ever return
@ -255,7 +255,7 @@ success or 0 on error.
On Windows platforms the openssl/async.h header is dependent on some
of the types customarily made available by including windows.h. The
application developer is likely to require control over when the latter
is included, commonly as one of the first included headers. Therefore
is included, commonly as one of the first included headers. Therefore,
it is defined as an application developer's responsibility to include
windows.h prior to async.h.
.SH "SEE ALSO"
@ -269,7 +269,7 @@ windows.h prior to async.h.
were added in OpenSSL 1.1.0.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: ASYNC_start_job.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: ASYNC_start_job.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "ASYNC_start_job 3"
.TH ASYNC_start_job 3 "2019-03-12" "1.1.1c" "OpenSSL"
.TH ASYNC_start_job 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -297,11 +297,11 @@ otherwise.
On Windows platforms the openssl/async.h header is dependent on some
of the types customarily made available by including windows.h. The
application developer is likely to require control over when the latter
is included, commonly as one of the first included headers. Therefore
is included, commonly as one of the first included headers. Therefore,
it is defined as an application developer's responsibility to include
windows.h prior to async.h.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "EXAMPLES"
.IX Header "EXAMPLES"
The following example demonstrates how to use most of the core async APIs:
.PP
.Vb 7
@ -452,7 +452,7 @@ ASYNC_start_job, ASYNC_pause_job, ASYNC_get_current_job, \fBASYNC_get_wait_ctx()
added in OpenSSL 1.1.0.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2015\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2015\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BF_encrypt.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: BF_encrypt.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BF_encrypt 3"
.TH BF_encrypt 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BF_encrypt 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -201,7 +201,7 @@ recipient needs to know what it was initialized with, or it won't be able
to decrypt. Some programs and protocols simplify this, like \s-1SSH,\s0 where
\&\fBivec\fR is simply initialized to zero.
\&\fBBF_cbc_encrypt()\fR operates on data that is a multiple of 8 bytes long, while
\&\fBBF_cfb64_encrypt()\fR and \fBBF_ofb64_encrypt()\fR are used to encrypt an variable
\&\fBBF_cfb64_encrypt()\fR and \fBBF_ofb64_encrypt()\fR are used to encrypt a variable
number of bytes (the amount does not have to be an exact multiple of 8). The
purpose of the latter two is to simulate stream ciphers, and therefore, they
need the parameter \fBnum\fR, which is a pointer to an integer where the current
@ -246,7 +246,7 @@ functions directly.
\&\fBdes_modes\fR\|(7)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_ADDR.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: BIO_ADDR.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_ADDR 3"
.TH BIO_ADDR 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_ADDR 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -183,7 +183,7 @@ with routines that will fill it with information, such as
\&\fBBIO_ADDR_clear()\fR clears any data held within the provided \fB\s-1BIO_ADDR\s0\fR and sets
it back to an uninitialised state.
.PP
\&\fBBIO_ADDR_rawmake()\fR takes a protocol \fBfamily\fR, an byte array of
\&\fBBIO_ADDR_rawmake()\fR takes a protocol \fBfamily\fR, a byte array of
size \fBwherelen\fR with an address in network byte order pointed at
by \fBwhere\fR and a port number in network byte order in \fBport\fR (except
for the \fB\s-1AF_UNIX\s0\fR protocol family, where \fBport\fR is meaningless and
@ -252,7 +252,7 @@ information they should return isn't available.
\&\fBBIO_connect\fR\|(3), \fBBIO_s_connect\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_ADDRINFO.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: BIO_ADDRINFO.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_ADDRINFO 3"
.TH BIO_ADDRINFO 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_ADDRINFO 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -233,7 +233,7 @@ information they should return isn't available.
.IX Header "NOTES"
The \fBBIO_lookup_ex()\fR implementation uses the platform provided \fBgetaddrinfo()\fR
function. On Linux it is known that specifying 0 for the protocol will not
return any \s-1SCTP\s0 based addresses when calling \fBgetaddrinfo()\fR. Therefore if an \s-1SCTP\s0
return any \s-1SCTP\s0 based addresses when calling \fBgetaddrinfo()\fR. Therefore, if an \s-1SCTP\s0
address is required then the \fBprotocol\fR parameter to \fBBIO_lookup_ex()\fR should be
explicitly set to \s-1IPPROTO_SCTP.\s0 The same may be true on other platforms.
.SH "HISTORY"
@ -241,7 +241,7 @@ explicitly set to \s-1IPPROTO_SCTP.\s0 The same may be true on other platforms.
The \fBBIO_lookup_ex()\fR function was added in OpenSSL 1.1.1.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2016\-2017 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_connect.3,v 1.3 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: BIO_connect.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_connect 3"
.TH BIO_connect 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH BIO_connect 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -165,7 +165,7 @@ but is present for future use.
.PP
\&\fBBIO_bind()\fR binds the source address and service to a socket and
may be useful before calling \fBBIO_connect()\fR. The options may include
\&\fB\s-1BIO_SOCK_REUSADDR\s0\fR, which is described in \*(L"\s-1FLAGS\*(R"\s0 below.
\&\fB\s-1BIO_SOCK_REUSEADDR\s0\fR, which is described in \*(L"\s-1FLAGS\*(R"\s0 below.
.PP
\&\fBBIO_connect()\fR connects \fBsock\fR to the address and service given by
\&\fBaddr\fR. Connection \fBoptions\fR may be zero or any combination of
@ -192,7 +192,7 @@ on the accepted socket. The flags are described in \*(L"\s-1FLAGS\*(R"\s0 below
Enables regular sending of keep-alive messages.
.IP "\s-1BIO_SOCK_NONBLOCK\s0" 4
.IX Item "BIO_SOCK_NONBLOCK"
Sets the socket to non-blocking mode.
Sets the socket to nonblocking mode.
.IP "\s-1BIO_SOCK_NODELAY\s0" 4
.IX Item "BIO_SOCK_NODELAY"
Corresponds to \fB\s-1TCP_NODELAY\s0\fR, and disables the Nagle algorithm. With
@ -237,7 +237,7 @@ error.
Use the functions described above instead.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2016\-2019 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_ctrl.3,v 1.19 2019/06/09 18:44:30 christos Exp $
.\" $NetBSD: BIO_ctrl.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_ctrl 3"
.TH BIO_ctrl 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_ctrl 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -248,7 +248,7 @@ Filter BIOs if they do not internally handle a particular \fBBIO_ctrl()\fR
operation usually pass the operation to the next \s-1BIO\s0 in the chain.
This often means there is no need to locate the required \s-1BIO\s0 for
a particular operation, it can be called on a chain and it will
be automatically passed to the relevant \s-1BIO.\s0 However this can cause
be automatically passed to the relevant \s-1BIO.\s0 However, this can cause
unexpected results: for example no current filter BIOs implement
\&\fBBIO_seek()\fR, but this may still succeed if the chain ends in a \s-1FILE\s0
or file descriptor \s-1BIO.\s0
@ -263,7 +263,7 @@ supported, if an error occurred, if \s-1EOF\s0 has not been reached and in
the case of \fBBIO_seek()\fR on a file \s-1BIO\s0 for a successful operation.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_f_base64.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_f_base64.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_f_base64 3"
.TH BIO_f_base64 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_f_base64 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_f_buffer.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_f_buffer.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_f_buffer 3"
.TH BIO_f_buffer 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_f_buffer 3 "2020-03-22" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -189,10 +189,20 @@ is expanded.
.IX Header "NOTES"
These functions, other than \fBBIO_f_buffer()\fR, are implemented as macros.
.PP
Buffering BIOs implement \fBBIO_gets()\fR by using \fBBIO_read_ex()\fR operations on the
next \s-1BIO\s0 in the chain. By prepending a buffering \s-1BIO\s0 to a chain it is therefore
possible to provide \fBBIO_gets()\fR functionality if the following BIOs do not
support it (for example \s-1SSL\s0 BIOs).
Buffering BIOs implement \fBBIO_read_ex()\fR and \fBBIO_gets()\fR by using
\&\fBBIO_read_ex()\fR operations on the next \s-1BIO\s0 in the chain and storing the
result in an internal buffer, from which bytes are given back to the
caller as appropriate for the call; a \fBBIO_gets()\fR is guaranteed to give
the caller a whole line, and \fBBIO_read_ex()\fR is guaranteed to give the
caller the number of bytes it asks for, unless there's an error or end
of communication is reached in the next \s-1BIO.\s0 By prepending a
buffering \s-1BIO\s0 to a chain it is therefore possible to provide
\&\fBBIO_gets()\fR or exact size \fBBIO_read_ex()\fR functionality if the following
BIOs do not support it.
.PP
Do not add more than one \fBBIO_f_buffer()\fR to a \s-1BIO\s0 chain. The result of
doing so will force a full read of the size of the internal buffer of
the top \fBBIO_f_buffer()\fR, which is 4 KiB at a minimum.
.PP
Data is only written to the next \s-1BIO\s0 in the chain when the write buffer fills
or when \fBBIO_flush()\fR is called. It is therefore important to call \fBBIO_flush()\fR
@ -219,7 +229,7 @@ there was an error.
\&\fBBIO_ctrl\fR\|(3).
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_f_cipher.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_f_cipher.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_f_cipher 3"
.TH BIO_f_cipher 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_f_cipher 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_f_md.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_f_md.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_f_md 3"
.TH BIO_f_md 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_f_md 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_f_null.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_f_null.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_f_null 3"
.TH BIO_f_null 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_f_null 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_f_ssl.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_f_ssl.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_f_ssl 3"
.TH BIO_f_ssl 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_f_ssl 3 "2020-01-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -266,9 +266,24 @@ processing.
\&\fBBIO_set_ssl()\fR, \fBBIO_get_ssl()\fR, \fBBIO_set_ssl_mode()\fR,
\&\fBBIO_set_ssl_renegotiate_bytes()\fR, \fBBIO_set_ssl_renegotiate_timeout()\fR,
\&\fBBIO_get_num_renegotiates()\fR, and \fBBIO_do_handshake()\fR are implemented as macros.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
This \s-1SSL/TLS\s0 client example, attempts to retrieve a page from an
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBBIO_f_ssl()\fR returns the \s-1SSL\s0 \fB\s-1BIO_METHOD\s0\fR structure.
.PP
\&\fBBIO_set_ssl()\fR, \fBBIO_get_ssl()\fR, \fBBIO_set_ssl_mode()\fR, \fBBIO_set_ssl_renegotiate_bytes()\fR,
\&\fBBIO_set_ssl_renegotiate_timeout()\fR and \fBBIO_get_num_renegotiates()\fR return 1 on
success or a value which is less than or equal to 0 if an error occurred.
.PP
\&\fBBIO_new_ssl()\fR, \fBBIO_new_ssl_connect()\fR and \fBBIO_new_buffer_ssl_connect()\fR return
a valid \fB\s-1BIO\s0\fR structure on success or \fB\s-1NULL\s0\fR if an error occurred.
.PP
\&\fBBIO_ssl_copy_session_id()\fR returns 1 on success or 0 on error.
.PP
\&\fBBIO_do_handshake()\fR returns 1 if the connection was established successfully.
A zero or negative value is returned if the connection could not be established.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
This \s-1SSL/TLS\s0 client example attempts to retrieve a page from an
\&\s-1SSL/TLS\s0 web server. The I/O routines are identical to those of the
unencrypted example in \fBBIO_s_connect\fR\|(3).
.PP
@ -411,21 +426,6 @@ a client and also echoes the request to standard output.
\& BIO_flush(sbio);
\& BIO_free_all(sbio);
.Ve
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBBIO_f_ssl()\fR returns the \s-1SSL\s0 \fB\s-1BIO_METHOD\s0\fR structure.
.PP
\&\fBBIO_set_ssl()\fR, \fBBIO_get_ssl()\fR, \fBBIO_set_ssl_mode()\fR, \fBBIO_set_ssl_renegotiate_bytes()\fR,
\&\fBBIO_set_ssl_renegotiate_timeout()\fR and \fBBIO_get_num_renegotiates()\fR return 1 on
success or a value which is less than or equal to 0 if an error occurred.
.PP
\&\fBBIO_new_ssl()\fR, \fBBIO_new_ssl_connect()\fR and \fBBIO_new_buffer_ssl_connect()\fR return
a valid \fB\s-1BIO\s0\fR structure on success or \fB\s-1NULL\s0\fR if an error occurred.
.PP
\&\fBBIO_ssl_copy_session_id()\fR returns 1 on success or 0 on error.
.PP
\&\fBBIO_do_handshake()\fR returns 1 if the connection was established successfully.
A zero or negative value is returned if the connection could not be established.
.SH "HISTORY"
.IX Header "HISTORY"
In OpenSSL before 1.0.0 the \fBBIO_pop()\fR call was handled incorrectly,
@ -436,7 +436,7 @@ included workarounds for this bug (e.g. freeing BIOs more than once) should
be modified to handle this fix or they may free up an already freed \s-1BIO.\s0
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2019 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_find_type.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_find_type.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_find_type 3"
.TH BIO_find_type 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_find_type 3 "2020-01-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -179,8 +179,8 @@ certain type.
\&\fBBIO_next()\fR returns the next \s-1BIO\s0 in a chain.
.PP
\&\fBBIO_method_type()\fR returns the type of the \s-1BIO\s0 \fBb\fR.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "EXAMPLES"
.IX Header "EXAMPLES"
Traverse a chain looking for digest BIOs:
.PP
.Vb 1
@ -199,7 +199,7 @@ Traverse a chain looking for digest BIOs:
.Ve
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2019 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_get_data.3,v 1.3 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_get_data.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_get_data 3"
.TH BIO_get_data 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_get_data 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -166,7 +166,7 @@ the \s-1BIO.\s0 This data can subsequently be retrieved via a call to \fBBIO_get
This can be used by custom BIOs for storing implementation specific information.
.PP
The \fBBIO_set_init()\fR function sets the value of the \s-1BIO\s0's \*(L"init\*(R" flag to indicate
whether initialisation has been completed for this \s-1BIO\s0 or not. A non-zero value
whether initialisation has been completed for this \s-1BIO\s0 or not. A nonzero value
indicates that initialisation is complete, whilst zero indicates that it is not.
Often initialisation will complete during initial construction of the \s-1BIO.\s0 For
some BIOs however, initialisation may not complete until after additional steps
@ -192,7 +192,7 @@ bio, BIO_meth_new
The functions described here were added in OpenSSL 1.1.0.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_get_ex_new_index.3,v 1.3 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_get_ex_new_index.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_get_ex_new_index 3"
.TH BIO_get_ex_new_index 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_get_ex_new_index 3 "2020-03-22" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -178,7 +178,7 @@ for any of the OpenSSL datatypes listed in
These functions handle application-specific data for OpenSSL data
structures.
.PP
\&\fBTYPE_get_new_ex_index()\fR is a macro that calls \fBCRYPTO_get_ex_new_index()\fR
\&\fBTYPE_get_ex_new_index()\fR is a macro that calls \fBCRYPTO_get_ex_new_index()\fR
with the correct \fBindex\fR value.
.PP
\&\fBTYPE_set_ex_data()\fR is a function that calls \fBCRYPTO_set_ex_data()\fR with
@ -188,7 +188,7 @@ an offset into the opaque exdata part of the \s-1TYPE\s0 object.
an offset into the opaque exdata part of the \s-1TYPE\s0 object.
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBTYPE_get_new_ex_index()\fR returns a new index on success or \-1 on error.
\&\fBTYPE_get_ex_new_index()\fR returns a new index on success or \-1 on error.
.PP
\&\fBTYPE_set_ex_data()\fR returns 1 on success or 0 on error.
.PP
@ -198,7 +198,7 @@ an offset into the opaque exdata part of the \s-1TYPE\s0 object.
\&\fBCRYPTO_get_ex_new_index\fR\|(3).
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2015\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2015\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_meth_new.3,v 1.3 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_meth_new.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_meth_new 3"
.TH BIO_meth_new 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_meth_new 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_new.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_new.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_new 3"
.TH BIO_new 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_new 3 "2020-01-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -190,8 +190,8 @@ on it other than the discarded return value.
.SH "HISTORY"
.IX Header "HISTORY"
\&\fBBIO_set()\fR was removed in OpenSSL 1.1.0 as \s-1BIO\s0 type is now opaque.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "EXAMPLES"
.IX Header "EXAMPLES"
Create a memory \s-1BIO:\s0
.PP
.Vb 1
@ -199,7 +199,7 @@ Create a memory \s-1BIO:\s0
.Ve
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2019 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_new_CMS.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_new_CMS.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_new_CMS 3"
.TH BIO_new_CMS 3 "2019-03-12" "1.1.1c" "OpenSSL"
.TH BIO_new_CMS 3 "2019-03-12" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_parse_hostserv.3,v 1.3 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_parse_hostserv.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_parse_hostserv 3"
.TH BIO_parse_hostserv 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_parse_hostserv 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -160,10 +160,10 @@ libcrypto, -lcrypto
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBBIO_parse_hostserv()\fR will parse the information given in \fBhostserv\fR,
create strings with the host name and service name and give those
create strings with the hostname and service name and give those
back via \fBhost\fR and \fBservice\fR. Those will need to be freed after
they are used. \fBhostserv_prio\fR helps determine if \fBhostserv\fR shall
be interpreted primarily as a host name or a service name in ambiguous
be interpreted primarily as a hostname or a service name in ambiguous
cases.
.PP
The syntax the \fBBIO_parse_hostserv()\fR recognises is:
@ -210,7 +210,7 @@ and \fBhostserv_prio\fR, as follows:
\&\s-1\fBBIO_ADDRINFO\s0\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2016\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2016\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_printf.3,v 1.3 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_printf.3,v 1.4 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_printf 3"
.TH BIO_printf 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_printf 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_push.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_push.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_push 3"
.TH BIO_push 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH BIO_push 3 "2019-06-09" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_read.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_read.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_read 3"
.TH BIO_read 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_read 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -194,7 +194,7 @@ the operation is not implemented in the specific \s-1BIO\s0 type. The trailing
.SH "NOTES"
.IX Header "NOTES"
A 0 or \-1 return is not necessarily an indication of an error. In
particular when the source/sink is non-blocking or of a certain type
particular when the source/sink is nonblocking or of a certain type
it may merely be an indication that no data is currently available and that
the application should retry the operation later.
.PP
@ -223,7 +223,7 @@ to the chain.
keep the '\en' at the end of the line in the buffer.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_accept.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_accept.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_accept 3"
.TH BIO_s_accept 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_s_accept 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -285,7 +285,7 @@ however because the accept \s-1BIO\s0 will still accept additional incoming
connections. This can be resolved by using \fBBIO_pop()\fR (see above)
and freeing up the accept \s-1BIO\s0 after the initial connection.
.PP
If the underlying accept socket is non-blocking and \fBBIO_do_accept()\fR is
If the underlying accept socket is nonblocking and \fBBIO_do_accept()\fR is
called to await an incoming connection it is possible for
\&\fBBIO_should_io_special()\fR with the reason \s-1BIO_RR_ACCEPT.\s0 If this happens
then it is an indication that an accept attempt would block: the application
@ -314,8 +314,8 @@ return 1 for success and 0 or \-1 for failure.
\&\fBBIO_get_bind_mode()\fR returns the set of \fB\s-1BIO_BIND\s0\fR flags, or \-1 on failure.
.PP
\&\fBBIO_new_accept()\fR returns a \s-1BIO\s0 or \s-1NULL\s0 on error.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "EXAMPLES"
.IX Header "EXAMPLES"
This example accepts two connections on port 4444, sends messages
down each and finally closes both down.
.PP
@ -365,7 +365,7 @@ down each and finally closes both down.
.Ve
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_bio.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_bio.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_bio 3"
.TH BIO_s_bio 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_s_bio 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -271,8 +271,8 @@ as macros.
locations for \fBbio1\fR and \fBbio2\fR. Check the error stack for more information.
.PP
[\s-1XXXXX:\s0 More return values need to be added here]
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "EXAMPLES"
.IX Header "EXAMPLES"
The \s-1BIO\s0 pair can be used to have full control over the network access of an
application. The application can call \fBselect()\fR on the socket as required
without having to go through the SSL-interface.
@ -283,7 +283,7 @@ without having to go through the SSL-interface.
\& ...
\& BIO_new_bio_pair(&internal_bio, 0, &network_bio, 0);
\& SSL_set_bio(ssl, internal_bio, internal_bio);
\& SSL_operations(); /* e.g SSL_read and SSL_write */
\& SSL_operations(); /* e.g. SSL_read and SSL_write */
\& ...
\&
\& application | TLS\-engine
@ -307,7 +307,7 @@ without having to go through the SSL-interface.
.Ve
.PP
As the \s-1BIO\s0 pair will only buffer the data and never directly access the
connection, it behaves non-blocking and will return as soon as the write
connection, it behaves nonblocking and will return as soon as the write
buffer is full or the read buffer is drained. Then the application has to
flush the write buffer and/or fill the read buffer.
.PP
@ -315,8 +315,8 @@ Use the \fBBIO_ctrl_pending()\fR, to find out whether data is buffered in the \s
and must be transferred to the network. Use \fBBIO_ctrl_get_read_request()\fR to
find out, how many bytes must be written into the buffer before the
\&\fBSSL_operation()\fR can successfully be continued.
.SH "WARNING"
.IX Header "WARNING"
.SH "WARNINGS"
.IX Header "WARNINGS"
As the data is buffered, \fBSSL_operation()\fR may return with an \s-1ERROR_SSL_WANT_READ\s0
condition, but there is still data in the write buffer. An application must
not rely on the error value of \fBSSL_operation()\fR but must assure that the
@ -328,7 +328,7 @@ the peer might be waiting for the data before being able to continue.
\&\fBBIO_should_retry\fR\|(3), \fBBIO_read_ex\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_connect.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_connect.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_connect 3"
.TH BIO_s_connect 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_s_connect 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -246,7 +246,7 @@ If blocking I/O is set then a non positive return value from any
I/O call is caused by an error condition, although a zero return
will normally mean that the connection was closed.
.PP
If the port name is supplied as part of the host name then this will
If the port name is supplied as part of the hostname then this will
override any value set with \fBBIO_set_conn_port()\fR. This may be undesirable
if the application does not wish to allow connection to arbitrary
ports. This can be avoided by checking for the presence of the ':'
@ -301,8 +301,8 @@ port or \s-1NULL\s0 if not set.
.PP
\&\fBBIO_do_connect()\fR returns 1 if the connection was successfully
established and 0 or \-1 if the connection failed.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "EXAMPLES"
.IX Header "EXAMPLES"
This is example connects to a webserver on the local host and attempts
to retrieve a page and copy the result to standard output.
.PP
@ -338,7 +338,7 @@ were removed in OpenSSL 1.1.0.
Use \fBBIO_set_conn_address()\fR and \fBBIO_get_conn_address()\fR instead.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_fd.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_fd.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_fd 3"
.TH BIO_s_fd 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_s_fd 3 "2020-01-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -206,8 +206,8 @@ been initialized.
.PP
\&\fBBIO_new_fd()\fR returns the newly allocated \s-1BIO\s0 or \s-1NULL\s0 is an error
occurred.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "EXAMPLES"
.IX Header "EXAMPLES"
This is a file descriptor \s-1BIO\s0 version of \*(L"Hello World\*(R":
.PP
.Vb 1
@ -226,7 +226,7 @@ This is a file descriptor \s-1BIO\s0 version of \*(L"Hello World\*(R":
\&\fBBIO_set_close\fR\|(3), \fBBIO_get_close\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2016 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2019 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_file.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_file.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_file 3"
.TH BIO_s_file 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH BIO_s_file 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -218,7 +218,7 @@ in stdio behaviour will be mirrored by the corresponding \s-1BIO.\s0
.PP
On Windows BIO_new_files reserves for the filename argument to be
\&\s-1UTF\-8\s0 encoded. In other words if you have to make it work in multi\-
lingual environment, encode file names in \s-1UTF\-8.\s0
lingual environment, encode filenames in \s-1UTF\-8.\s0
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBBIO_s_file()\fR returns the file \s-1BIO\s0 method.
@ -301,7 +301,7 @@ occurred this differs from other types of \s-1BIO\s0 which will typically return
\&\fBBIO_set_close\fR\|(3), \fBBIO_get_close\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2019 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_mem.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_mem.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_mem 3"
.TH BIO_s_mem 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH BIO_s_mem 3 "2020-01-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -182,9 +182,10 @@ If the \s-1BIO_CLOSE\s0 flag is set when a memory \s-1BIO\s0 is freed then the u
\&\s-1BUF_MEM\s0 structure is also freed.
.PP
Calling \fBBIO_reset()\fR on a read write memory \s-1BIO\s0 clears any data in it if the
flag \s-1BIO_FLAGS_NONCLEAR_RST\s0 is not set. On a read only \s-1BIO\s0 or if the flag
\&\s-1BIO_FLAGS_NONCLEAR_RST\s0 is set it restores the \s-1BIO\s0 to its original state and
the data can be read again.
flag \s-1BIO_FLAGS_NONCLEAR_RST\s0 is not set, otherwise it just restores the read
pointer to the state it was just after the last write was performed and the
data can be read again. On a read only \s-1BIO\s0 it similarly restores the \s-1BIO\s0 to
its original state and the read only data can be read again.
.PP
\&\fBBIO_eof()\fR is true if no data is in the \s-1BIO.\s0
.PP
@ -219,11 +220,11 @@ first, so the supplied area of memory must be unchanged until the \s-1BIO\s0 is
Writes to memory BIOs will always succeed if memory is available: that is
their size can grow indefinitely.
.PP
Every read from a read write memory \s-1BIO\s0 will remove the data just read with
an internal copy operation, if a \s-1BIO\s0 contains a lot of data and it is
read in small chunks the operation can be very slow. The use of a read only
memory \s-1BIO\s0 avoids this problem. If the \s-1BIO\s0 must be read write then adding
a buffering \s-1BIO\s0 to the chain will speed up the process.
Every write after partial read (not all data in the memory buffer was read)
to a read write memory \s-1BIO\s0 will have to move the unread data with an internal
copy operation, if a \s-1BIO\s0 contains a lot of data and it is read in small
chunks intertwined with writes the operation can be very slow. Adding
a buffering \s-1BIO\s0 to the chain can speed up the process.
.PP
Calling \fBBIO_set_mem_buf()\fR on a \s-1BIO\s0 created with \fBBIO_new_secmem()\fR will
give undefined results, including perhaps a program crash.
@ -243,11 +244,31 @@ contains only the remaining data to be read. If the close status of the
\&\s-1BIO\s0 is set to \s-1BIO_NOCLOSE,\s0 before freeing the \s-1BUF_MEM\s0 the data pointer
in it must be set to \s-1NULL\s0 as the data pointer does not point to an
allocated memory.
.PP
Calling \fBBIO_reset()\fR on a read write memory \s-1BIO\s0 with \s-1BIO_FLAGS_NONCLEAR_RST\s0
flag set can have unexpected outcome when the reads and writes to the
\&\s-1BIO\s0 are intertwined. As documented above the \s-1BIO\s0 will be reset to the
state after the last completed write operation. The effects of reads
preceding that write operation cannot be undone.
.PP
Calling \fBBIO_get_mem_ptr()\fR prior to a \fBBIO_reset()\fR call with
\&\s-1BIO_FLAGS_NONCLEAR_RST\s0 set has the same effect as a write operation.
.SH "BUGS"
.IX Header "BUGS"
There should be an option to set the maximum size of a memory \s-1BIO.\s0
.SH "EXAMPLE"
.IX Header "EXAMPLE"
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBBIO_s_mem()\fR and \fBBIO_s_secmem()\fR return a valid memory \fB\s-1BIO_METHOD\s0\fR structure.
.PP
\&\fBBIO_set_mem_eof_return()\fR, \fBBIO_set_mem_buf()\fR and \fBBIO_get_mem_ptr()\fR
return 1 on success or a value which is less than or equal to 0 if an error occurred.
.PP
\&\fBBIO_get_mem_data()\fR returns the total number of bytes available on success,
0 if b is \s-1NULL,\s0 or a negative value in case of other errors.
.PP
\&\fBBIO_new_mem_buf()\fR returns a valid \fB\s-1BIO\s0\fR structure on success or \s-1NULL\s0 on error.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
Create a memory \s-1BIO\s0 and write some data to it:
.PP
.Vb 1
@ -272,14 +293,6 @@ Extract the \s-1BUF_MEM\s0 structure from a memory \s-1BIO\s0 and then free up t
\& BIO_set_close(mem, BIO_NOCLOSE); /* So BIO_free() leaves BUF_MEM alone */
\& BIO_free(mem);
.Ve
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBBIO_s_mem()\fR and \fBBIO_s_secmem()\fR return a valid memory \fB\s-1BIO_METHOD\s0\fR structure.
.PP
\&\fBBIO_set_mem_eof_return()\fR, \fBBIO_get_mem_data()\fR, \fBBIO_set_mem_buf()\fR and \fBBIO_get_mem_ptr()\fR
return 1 on success or a value which is less than or equal to 0 if an error occurred.
.PP
\&\fBBIO_new_mem_buf()\fR returns a valid \fB\s-1BIO\s0\fR structure on success or \s-1NULL\s0 on error.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2019 The OpenSSL Project Authors. All Rights Reserved.

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_null.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_null.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_null 3"
.TH BIO_s_null 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_s_null 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_s_socket.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_s_socket.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_s_socket 3"
.TH BIO_s_socket 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_s_socket 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_set_callback.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_set_callback.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_set_callback 3"
.TH BIO_set_callback 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_set_callback 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -172,7 +172,7 @@ libcrypto, -lcrypto
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBBIO_set_callback_ex()\fR and \fBBIO_get_callback_ex()\fR set and retrieve the \s-1BIO\s0
callback. The callback is called during most high level \s-1BIO\s0 operations. It can
callback. The callback is called during most high-level \s-1BIO\s0 operations. It can
be used for debugging purposes to trace operations on a \s-1BIO\s0 or to modify its
operation.
.PP
@ -374,10 +374,6 @@ after.
Note: \fBcmd\fR == \fB\s-1BIO_CTRL_SET_CALLBACK\s0\fR is special, because \fBparg\fR is not the
argument of type \fBBIO_info_cb\fR itself. In this case \fBparg\fR is a pointer to
the actual call parameter, see \fBBIO_callback_ctrl\fR.
.SH "EXAMPLE"
.IX Header "EXAMPLE"
The \fBBIO_debug_callback()\fR function is a good example, its source is
in crypto/bio/bio_cb.c
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
\&\fBBIO_get_callback_ex()\fR and \fBBIO_get_callback()\fR return the callback function
@ -389,9 +385,13 @@ via a call to \fBBIO_set_callback_arg()\fR.
.PP
\&\fBBIO_debug_callback()\fR returns 1 or \fBret\fR if it's called after specific \s-1BIO\s0
operations.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
The \fBBIO_debug_callback()\fR function is a good example, its source is
in crypto/bio/bio_cb.c
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BIO_should_retry.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BIO_should_retry.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BIO_should_retry 3"
.TH BIO_should_retry 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BIO_should_retry 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_BLINDING_new.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_BLINDING_new.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_BLINDING_new 3"
.TH BN_BLINDING_new 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_BLINDING_new 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_CTX_new.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_CTX_new.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_CTX_new 3"
.TH BN_CTX_new 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_CTX_new 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_CTX_start.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_CTX_start.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_CTX_start 3"
.TH BN_CTX_start 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH BN_CTX_start 3 "2019-06-09" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_add.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_add.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_add 3"
.TH BN_add 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_add 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -209,16 +209,16 @@ For division by powers of 2, use \fBBN_rshift\fR\|(3).
.PP
\&\fBBN_mod()\fR corresponds to \fBBN_div()\fR with \fIdv\fR set to \fB\s-1NULL\s0\fR.
.PP
\&\fBBN_nnmod()\fR reduces \fIa\fR modulo \fIm\fR and places the non-negative
\&\fBBN_nnmod()\fR reduces \fIa\fR modulo \fIm\fR and places the nonnegative
remainder in \fIr\fR.
.PP
\&\fBBN_mod_add()\fR adds \fIa\fR to \fIb\fR modulo \fIm\fR and places the non-negative
\&\fBBN_mod_add()\fR adds \fIa\fR to \fIb\fR modulo \fIm\fR and places the nonnegative
result in \fIr\fR.
.PP
\&\fBBN_mod_sub()\fR subtracts \fIb\fR from \fIa\fR modulo \fIm\fR and places the
non-negative result in \fIr\fR.
nonnegative result in \fIr\fR.
.PP
\&\fBBN_mod_mul()\fR multiplies \fIa\fR by \fIb\fR and finds the non-negative
\&\fBBN_mod_mul()\fR multiplies \fIa\fR by \fIb\fR and finds the nonnegative
remainder respective to modulus \fIm\fR (\f(CW\*(C`r=(a*b) mod m\*(C'\fR). \fIr\fR may be
the same \fB\s-1BIGNUM\s0\fR as \fIa\fR or \fIb\fR. For more efficient algorithms for
repeated computations using the same modulus, see
@ -257,7 +257,7 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3).
\&\fBBN_add_word\fR\|(3), \fBBN_set_bit\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_add_word.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_add_word.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_add_word 3"
.TH BN_add_word 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_add_word 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_bn2bin.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_bn2bin.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_bn2bin 3"
.TH BN_bn2bin 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_bn2bin 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -178,7 +178,7 @@ memory.
.PP
\&\fBBN_bn2binpad()\fR also converts the absolute value of \fBa\fR into big-endian form
and stores it at \fBto\fR. \fBtolen\fR indicates the length of the output buffer
\&\fBto\fR. The result is padded with zeroes if necessary. If \fBtolen\fR is less than
\&\fBto\fR. The result is padded with zeros if necessary. If \fBtolen\fR is less than
BN_num_bytes(\fBa\fR) an error is returned.
.PP
\&\fBBN_bin2bn()\fR converts the positive integer in big-endian form of length
@ -244,7 +244,7 @@ The error codes can be obtained by \fBERR_get_error\fR\|(3).
\&\fBBN_num_bytes\fR\|(3)
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_cmp.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_cmp.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_cmp 3"
.TH BN_cmp 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_cmp 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_copy.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_copy.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_copy 3"
.TH BN_copy 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_copy 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_generate_prime.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_generate_prime.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_generate_prime 3"
.TH BN_generate_prime 3 "2019-03-12" "1.1.1c" "OpenSSL"
.TH BN_generate_prime 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -194,7 +194,11 @@ Deprecated:
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBBN_generate_prime_ex()\fR generates a pseudo-random prime number of
at least bit length \fBbits\fR.
at least bit length \fBbits\fR. The returned number is probably prime
with a negligible error. If \fBadd\fR is \fB\s-1NULL\s0\fR the returned prime
number will have exact bit length \fBbits\fR with the top most two
bits set.
.PP
If \fBret\fR is not \fB\s-1NULL\s0\fR, it will be used to store the number.
.PP
If \fBcb\fR is not \fB\s-1NULL\s0\fR, it is used as follows:
@ -218,10 +222,13 @@ If \fBadd\fR is not \fB\s-1NULL\s0\fR, the prime will fulfill the condition p %
generator.
.PP
If \fBsafe\fR is true, it will be a safe prime (i.e. a prime p so
that (p\-1)/2 is also prime).
that (p\-1)/2 is also prime). If \fBsafe\fR is true, and \fBrem\fR == \fB\s-1NULL\s0\fR
the condition will be p % \fBadd\fR == 3.
It is recommended that \fBadd\fR is a multiple of 4.
.PP
The \s-1PRNG\s0 must be seeded prior to calling \fBBN_generate_prime_ex()\fR.
The prime number generation has a negligible error probability.
The random generator must be seeded prior to calling \fBBN_generate_prime_ex()\fR.
If the automatic seeding or reseeding of the OpenSSL \s-1CSPRNG\s0 fails due to
external circumstances (see \s-1\fBRAND\s0\fR\|(7)), the operation will fail.
.PP
\&\fBBN_is_prime_ex()\fR and \fBBN_is_prime_fasttest_ex()\fR test if the number \fBp\fR is
prime. The following tests are performed until one of them shows that
@ -251,7 +258,7 @@ For instance, to reach the 128 bit security level, \fBnchecks\fR should be set t
.PP
If \fBcb\fR is not \fB\s-1NULL\s0\fR, \fBBN_GENCB_call(cb, 1, j)\fR is called
after the j\-th iteration (j = 0, 1, ...). \fBctx\fR is a
pre-allocated \fB\s-1BN_CTX\s0\fR (to save the overhead of allocating and
preallocated \fB\s-1BN_CTX\s0\fR (to save the overhead of allocating and
freeing the structure in a loop), or \fB\s-1NULL\s0\fR.
.PP
\&\fBBN_GENCB_call()\fR calls the callback function held in the \fB\s-1BN_GENCB\s0\fR structure
@ -325,14 +332,15 @@ Instead applications should create a \s-1BN_GENCB\s0 structure using BN_GENCB_ne
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBDH_generate_parameters\fR\|(3), \fBDSA_generate_parameters\fR\|(3),
\&\fBRSA_generate_key\fR\|(3), \fBERR_get_error\fR\|(3), \fBRAND_bytes\fR\|(3)
\&\fBRSA_generate_key\fR\|(3), \fBERR_get_error\fR\|(3), \fBRAND_bytes\fR\|(3),
\&\s-1\fBRAND\s0\fR\|(7)
.SH "HISTORY"
.IX Header "HISTORY"
The \fBBN_GENCB_new()\fR, \fBBN_GENCB_free()\fR,
and \fBBN_GENCB_get_arg()\fR functions were added in OpenSSL 1.1.0.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_mod_inverse.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_mod_inverse.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_mod_inverse 3"
.TH BN_mod_inverse 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_mod_inverse 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_mod_mul_montgomery.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_mod_mul_montgomery.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_mod_mul_montgomery 3"
.TH BN_mod_mul_montgomery 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_mod_mul_montgomery 3 "2020-12-10" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -190,7 +190,7 @@ the result in \fIr\fR.
\&\fBBN_from_montgomery()\fR performs the Montgomery reduction \fIr\fR = \fIa\fR*R^\-1.
.PP
\&\fBBN_to_montgomery()\fR computes Mont(\fIa\fR,R^2), i.e. \fIa\fR*R.
Note that \fIa\fR must be non-negative and smaller than the modulus.
Note that \fIa\fR must be nonnegative and smaller than the modulus.
.PP
For all functions, \fIctx\fR is a previously allocated \fB\s-1BN_CTX\s0\fR used for
temporary variables.
@ -203,8 +203,8 @@ on error.
.PP
For the other functions, 1 is returned for success, 0 on error.
The error codes can be obtained by \fBERR_get_error\fR\|(3).
.SH "WARNING"
.IX Header "WARNING"
.SH "WARNINGS"
.IX Header "WARNINGS"
The inputs must be reduced modulo \fBm\fR, otherwise the result will be
outside the expected range.
.SH "SEE ALSO"
@ -216,7 +216,7 @@ outside the expected range.
\&\fBBN_MONT_CTX_init()\fR was removed in OpenSSL 1.1.0
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright 2000\-2017 The OpenSSL Project Authors. All Rights Reserved.
Copyright 2000\-2020 The OpenSSL Project Authors. All Rights Reserved.
.PP
Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
this file except in compliance with the License. You can obtain a copy

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_mod_mul_reciprocal.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_mod_mul_reciprocal.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_mod_mul_reciprocal 3"
.TH BN_mod_mul_reciprocal 3 "2018-09-23" "1.1.1c" "OpenSSL"
.TH BN_mod_mul_reciprocal 3 "2018-09-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l

View File

@ -1,6 +1,6 @@
.\" $NetBSD: BN_new.3,v 1.19 2019/06/09 18:44:31 christos Exp $
.\" $NetBSD: BN_new.3,v 1.20 2020/12/10 00:33:11 christos Exp $
.\"
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
@ -135,7 +135,7 @@
.\" ========================================================================
.\"
.IX Title "BN_new 3"
.TH BN_new 3 "2019-06-09" "1.1.1c" "OpenSSL"
.TH BN_new 3 "2020-01-23" "1.1.1i" "OpenSSL"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@ -185,7 +185,7 @@ by \fBERR_get_error\fR\|(3).
\&\fBBN_clear()\fR, \fBBN_free()\fR and \fBBN_clear_free()\fR have no return values.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBERR_get_error\fR\|(3)
\&\fBERR_get_error\fR\|(3), \fBOPENSSL_secure_malloc\fR\|(3)
.SH "HISTORY"
.IX Header "HISTORY"
\&\fBBN_init()\fR was removed in OpenSSL 1.1.0; use \fBBN_new()\fR instead.

Some files were not shown because too many files have changed in this diff Show More