Compare commits
133 Commits
OpenSSL_1_
...
OpenSSL_1_
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b72417a00 | ||
|
|
aabbe99fcb | ||
|
|
8011cd56e3 | ||
|
|
d3152655d5 | ||
|
|
006cd7083f | ||
|
|
bc8923b1ec | ||
|
|
1632ef7448 | ||
|
|
f1f4fbde2a | ||
|
|
1854c48005 | ||
|
|
ebda73f867 | ||
|
|
bcc311668e | ||
|
|
1dd26414df | ||
|
|
056389eb1c | ||
|
|
a07856a08d | ||
|
|
19ce768c6b | ||
|
|
aaed77c55e | ||
|
|
49270d0431 | ||
|
|
673c42b238 | ||
|
|
5541b18ba8 | ||
|
|
28e117f49f | ||
|
|
46bfc05480 | ||
|
|
427a37ca3f | ||
|
|
39ae3b338f | ||
|
|
48f5b3efce | ||
|
|
f8dc000699 | ||
|
|
bf8d6f9ab8 | ||
|
|
17e844a450 | ||
|
|
8ca7d12430 | ||
|
|
67b9c82ea2 | ||
|
|
a6f5b991eb | ||
|
|
756587dcb9 | ||
|
|
0a084f7b3a | ||
|
|
da0a95b23a | ||
|
|
599fe418a1 | ||
|
|
4519e7b839 | ||
|
|
4659b53e7d | ||
|
|
dc22495d35 | ||
|
|
ab0d964259 | ||
|
|
dac3654e2d | ||
|
|
989d87cb1a | ||
|
|
d6934a02b5 | ||
|
|
f9986e9abf | ||
|
|
1f5e321ec1 | ||
|
|
b6adb6ef58 | ||
|
|
bfdaf45141 | ||
|
|
69526a354d | ||
|
|
778f2b648c | ||
|
|
2223317bef | ||
|
|
b107586c0c | ||
|
|
d544755389 | ||
|
|
88398e9ba3 | ||
|
|
15c1ac03c8 | ||
|
|
c3c6fc7855 | ||
|
|
4d8cca8a7e | ||
|
|
d61be85581 | ||
|
|
9e456a8537 | ||
|
|
f179e2b899 | ||
|
|
6a60b41431 | ||
|
|
c6a47f988c | ||
|
|
d0666f289a | ||
|
|
d8afda60a9 | ||
|
|
804ab36df6 | ||
|
|
a41d5174e2 | ||
|
|
9c5d953a07 | ||
|
|
7b7b18c57e | ||
|
|
8eb094b946 | ||
|
|
7fa18a63cb | ||
|
|
90600a5e3b | ||
|
|
23f5908ac7 | ||
|
|
e622237d12 | ||
|
|
f0816174d2 | ||
|
|
057444f844 | ||
|
|
725c5f1ad3 | ||
|
|
9c8dc84ac1 | ||
|
|
e3899ababb | ||
|
|
3fc880ac5d | ||
|
|
602b2790ca | ||
|
|
b05a3ad765 | ||
|
|
3d8f4f23af | ||
|
|
a74bee5fc7 | ||
|
|
55c9e24875 | ||
|
|
ebe221948d | ||
|
|
b2d951e423 | ||
|
|
c5993d10a8 | ||
|
|
5be1ae28ef | ||
|
|
96db9023b8 | ||
|
|
0d7717fc9c | ||
|
|
aba7600029 | ||
|
|
00acdfbf98 | ||
|
|
51624dbdae | ||
|
|
9e29df0027 | ||
|
|
f54167d1dc | ||
|
|
6042582b62 | ||
|
|
50522642a0 | ||
|
|
bfc3424d1f | ||
|
|
1c65936882 | ||
|
|
40acdb192e | ||
|
|
4b7a4ba29c | ||
|
|
e0660c6257 | ||
|
|
b4ada742d1 | ||
|
|
a93d952cd4 | ||
|
|
5b56fec6f5 | ||
|
|
32171e4e07 | ||
|
|
48e6edabed | ||
|
|
069607124d | ||
|
|
caf55bfacf | ||
|
|
ce3631015e | ||
|
|
3ae1b53496 | ||
|
|
79bb00534d | ||
|
|
c4b16ddc8f | ||
|
|
deb3b08ff2 | ||
|
|
b45b3efd5d | ||
|
|
e420060ac9 | ||
|
|
d8ec8a4a65 | ||
|
|
040ed7b4d0 | ||
|
|
c76e5b08a1 | ||
|
|
0071215832 | ||
|
|
4a55631e4d | ||
|
|
19a68574a9 | ||
|
|
f21e6b6ecb | ||
|
|
e1549a01c7 | ||
|
|
765be74d24 | ||
|
|
9614d2c676 | ||
|
|
ad03c71ea1 | ||
|
|
4eedf86a16 | ||
|
|
eb85ee9a88 | ||
|
|
fa2026dc88 | ||
|
|
fe08007399 | ||
|
|
e3ebdcff12 | ||
|
|
cb10cf1224 | ||
|
|
c0dd71c97c | ||
|
|
51478be956 | ||
|
|
a7304e4b98 |
@@ -10,13 +10,18 @@ OpenSSL project.
|
||||
We would like to identify and thank the following such sponsors for their past
|
||||
or current significant support of the OpenSSL project:
|
||||
|
||||
Major support:
|
||||
|
||||
Qualys http://www.qualys.com/
|
||||
|
||||
Very significant support:
|
||||
|
||||
OpenGear: www.opengear.com
|
||||
OpenGear: http://www.opengear.com/
|
||||
|
||||
Significant support:
|
||||
|
||||
PSW Group: www.psw.net
|
||||
PSW Group: http://www.psw.net/
|
||||
Acano Ltd. http://acano.com/
|
||||
|
||||
Please note that we ask permission to identify sponsors and that some sponsors
|
||||
we consider eligible for inclusion here have requested to remain anonymous.
|
||||
|
||||
73
CHANGES
73
CHANGES
@@ -2,6 +2,79 @@
|
||||
OpenSSL CHANGES
|
||||
_______________
|
||||
|
||||
Changes between 1.0.1g and 1.0.1h [5 Jun 2014]
|
||||
|
||||
*) Fix for SSL/TLS MITM flaw. An attacker using a carefully crafted
|
||||
handshake can force the use of weak keying material in OpenSSL
|
||||
SSL/TLS clients and servers.
|
||||
|
||||
Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for discovering and
|
||||
researching this issue. (CVE-2014-0224)
|
||||
[KIKUCHI Masashi, Steve Henson]
|
||||
|
||||
*) Fix DTLS recursion flaw. By sending an invalid DTLS handshake to an
|
||||
OpenSSL DTLS client the code can be made to recurse eventually crashing
|
||||
in a DoS attack.
|
||||
|
||||
Thanks to Imre Rad (Search-Lab Ltd.) for discovering this issue.
|
||||
(CVE-2014-0221)
|
||||
[Imre Rad, Steve Henson]
|
||||
|
||||
*) Fix DTLS invalid fragment vulnerability. A buffer overrun attack can
|
||||
be triggered by sending invalid DTLS fragments to an OpenSSL DTLS
|
||||
client or server. This is potentially exploitable to run arbitrary
|
||||
code on a vulnerable client or server.
|
||||
|
||||
Thanks to J<>ri Aedla for reporting this issue. (CVE-2014-0195)
|
||||
[J<>ri Aedla, Steve Henson]
|
||||
|
||||
*) Fix bug in TLS code where clients enable anonymous ECDH ciphersuites
|
||||
are subject to a denial of service attack.
|
||||
|
||||
Thanks to Felix Gr<47>bert and Ivan Fratric at Google for discovering
|
||||
this issue. (CVE-2014-3470)
|
||||
[Felix Gr<47>bert, Ivan Fratric, Steve Henson]
|
||||
|
||||
*) Harmonize version and its documentation. -f flag is used to display
|
||||
compilation flags.
|
||||
[mancha <mancha1@zoho.com>]
|
||||
|
||||
*) Fix eckey_priv_encode so it immediately returns an error upon a failure
|
||||
in i2d_ECPrivateKey.
|
||||
[mancha <mancha1@zoho.com>]
|
||||
|
||||
*) Fix some double frees. These are not thought to be exploitable.
|
||||
[mancha <mancha1@zoho.com>]
|
||||
|
||||
Changes between 1.0.1f and 1.0.1g [7 Apr 2014]
|
||||
|
||||
*) A missing bounds check in the handling of the TLS heartbeat extension
|
||||
can be used to reveal up to 64k of memory to a connected client or
|
||||
server.
|
||||
|
||||
Thanks for Neel Mehta of Google Security for discovering this bug and to
|
||||
Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm.org> for
|
||||
preparing the fix (CVE-2014-0160)
|
||||
[Adam Langley, Bodo Moeller]
|
||||
|
||||
*) Fix for the attack described in the paper "Recovering OpenSSL
|
||||
ECDSA Nonces Using the FLUSH+RELOAD Cache Side-channel Attack"
|
||||
by Yuval Yarom and Naomi Benger. Details can be obtained from:
|
||||
http://eprint.iacr.org/2014/140
|
||||
|
||||
Thanks to Yuval Yarom and Naomi Benger for discovering this
|
||||
flaw and to Yuval Yarom for supplying a fix (CVE-2014-0076)
|
||||
[Yuval Yarom and Naomi Benger]
|
||||
|
||||
*) TLS pad extension: draft-agl-tls-padding-03
|
||||
|
||||
Workaround for the "TLS hang bug" (see FAQ and PR#2771): if the
|
||||
TLS client Hello record length value would otherwise be > 255 and
|
||||
less that 512 pad with a dummy extension containing zeroes so it
|
||||
is at least 512 bytes long.
|
||||
|
||||
[Adam Langley, Steve Henson]
|
||||
|
||||
Changes between 1.0.1e and 1.0.1f [6 Jan 2014]
|
||||
|
||||
*) Fix for TLS record tampering bug. A carefully crafted invalid
|
||||
|
||||
@@ -526,7 +526,7 @@ my %table=(
|
||||
# 'perl Configure VC-WIN32' with '-DUNICODE -D_UNICODE'
|
||||
"VC-WIN32","cl:-W3 -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
|
||||
# Unified CE target
|
||||
"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
|
||||
"debug-VC-WIN32","cl:-W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
|
||||
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
|
||||
|
||||
# Borland C++ 4.5
|
||||
|
||||
3
FAQ
3
FAQ
@@ -768,6 +768,9 @@ openssl-security@openssl.org if you don't get a prompt reply at least
|
||||
acknowledging receipt then resend or mail it directly to one of the
|
||||
more active team members (e.g. Steve).
|
||||
|
||||
Note that bugs only present in the openssl utility are not in general
|
||||
considered to be security issues.
|
||||
|
||||
[PROG] ========================================================================
|
||||
|
||||
* Is OpenSSL thread-safe?
|
||||
|
||||
@@ -302,8 +302,8 @@ libcrypto$(SHLIB_EXT): libcrypto.a fips_premain_dso$(EXE_EXT)
|
||||
FIPSLD_CC="$(CC)"; CC=$(FIPSDIR)/bin/fipsld; \
|
||||
export CC FIPSLD_CC FIPSLD_LIBCRYPTO; \
|
||||
fi; \
|
||||
$(MAKE) -e SHLIBDIRS=crypto CC=$${CC:-$(CC)} build-shared; \
|
||||
touch -c fips_premain_dso$(EXE_EXT); \
|
||||
$(MAKE) -e SHLIBDIRS=crypto CC="$${CC:-$(CC)}" build-shared && \
|
||||
(touch -c fips_premain_dso$(EXE_EXT) || :); \
|
||||
else \
|
||||
echo "There's no support for shared libraries on this platform" >&2; \
|
||||
exit 1; \
|
||||
|
||||
15
NEWS
15
NEWS
@@ -5,8 +5,23 @@
|
||||
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.0.1g and OpenSSL 1.0.1h [5 Jun 2014]
|
||||
|
||||
o Fix for CVE-2014-0224
|
||||
o Fix for CVE-2014-0221
|
||||
o Fix for CVE-2014-0195
|
||||
o Fix for CVE-2014-3470
|
||||
o Fix for CVE-2010-5298
|
||||
|
||||
Major changes between OpenSSL 1.0.1f and OpenSSL 1.0.1g [7 Apr 2014]
|
||||
|
||||
o Fix for CVE-2014-0160
|
||||
o Add TLS padding extension workaround for broken servers.
|
||||
o Fix for CVE-2014-0076
|
||||
|
||||
Major changes between OpenSSL 1.0.1e and OpenSSL 1.0.1f [6 Jan 2014]
|
||||
|
||||
o Don't include gmt_unix_time in TLS server and client random values
|
||||
o Fix for TLS record tampering bug CVE-2013-4353
|
||||
o Fix for TLS version checking bug CVE-2013-6449
|
||||
o Fix for DTLS retransmission bug CVE-2013-6450
|
||||
|
||||
2
README
2
README
@@ -1,5 +1,5 @@
|
||||
|
||||
OpenSSL 1.0.1f 6 Jan 2014
|
||||
OpenSSL 1.0.1h 5 Jun 2014
|
||||
|
||||
Copyright (c) 1998-2011 The OpenSSL Project
|
||||
Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson
|
||||
|
||||
2
TABLE
2
TABLE
@@ -1586,7 +1586,7 @@ $multilib =
|
||||
|
||||
*** debug-VC-WIN32
|
||||
$cc = cl
|
||||
$cflags = -W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE
|
||||
$cflags = -W3 -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE
|
||||
$unistd =
|
||||
$thread_cflag =
|
||||
$sys_id = WIN32
|
||||
|
||||
@@ -586,12 +586,12 @@ int password_callback(char *buf, int bufsiz, int verify,
|
||||
|
||||
if (ok >= 0)
|
||||
ok = UI_add_input_string(ui,prompt,ui_flags,buf,
|
||||
PW_MIN_LENGTH,BUFSIZ-1);
|
||||
PW_MIN_LENGTH,bufsiz-1);
|
||||
if (ok >= 0 && verify)
|
||||
{
|
||||
buff = (char *)OPENSSL_malloc(bufsiz);
|
||||
ok = UI_add_verify_string(ui,prompt,ui_flags,buff,
|
||||
PW_MIN_LENGTH,BUFSIZ-1, buf);
|
||||
PW_MIN_LENGTH,bufsiz-1, buf);
|
||||
}
|
||||
if (ok >= 0)
|
||||
do
|
||||
@@ -2841,7 +2841,7 @@ double app_tminterval(int stop,int usertime)
|
||||
|
||||
if (proc==NULL)
|
||||
{
|
||||
if (GetVersion() < 0x80000000)
|
||||
if (check_winnt())
|
||||
proc = OpenProcess(PROCESS_QUERY_INFORMATION,FALSE,
|
||||
GetCurrentProcessId());
|
||||
if (proc==NULL) proc = (HANDLE)-1;
|
||||
|
||||
18
apps/crl.c
18
apps/crl.c
@@ -81,6 +81,9 @@ static const char *crl_usage[]={
|
||||
" -in arg - input file - default stdin\n",
|
||||
" -out arg - output file - default stdout\n",
|
||||
" -hash - print hash value\n",
|
||||
#ifndef OPENSSL_NO_MD5
|
||||
" -hash_old - print old-style (MD5) hash value\n",
|
||||
#endif
|
||||
" -fingerprint - print the crl fingerprint\n",
|
||||
" -issuer - print issuer DN\n",
|
||||
" -lastupdate - lastUpdate field\n",
|
||||
@@ -108,6 +111,9 @@ int MAIN(int argc, char **argv)
|
||||
int informat,outformat;
|
||||
char *infile=NULL,*outfile=NULL;
|
||||
int hash=0,issuer=0,lastupdate=0,nextupdate=0,noout=0,text=0;
|
||||
#ifndef OPENSSL_NO_MD5
|
||||
int hash_old=0;
|
||||
#endif
|
||||
int fingerprint = 0, crlnumber = 0;
|
||||
const char **pp;
|
||||
X509_STORE *store = NULL;
|
||||
@@ -192,6 +198,10 @@ int MAIN(int argc, char **argv)
|
||||
text = 1;
|
||||
else if (strcmp(*argv,"-hash") == 0)
|
||||
hash= ++num;
|
||||
#ifndef OPENSSL_NO_MD5
|
||||
else if (strcmp(*argv,"-hash_old") == 0)
|
||||
hash_old= ++num;
|
||||
#endif
|
||||
else if (strcmp(*argv,"-nameopt") == 0)
|
||||
{
|
||||
if (--argc < 1) goto bad;
|
||||
@@ -304,6 +314,14 @@ bad:
|
||||
BIO_printf(bio_out,"%08lx\n",
|
||||
X509_NAME_hash(X509_CRL_get_issuer(x)));
|
||||
}
|
||||
#ifndef OPENSSL_NO_MD5
|
||||
if (hash_old == i)
|
||||
{
|
||||
BIO_printf(bio_out,"%08lx\n",
|
||||
X509_NAME_hash_old(
|
||||
X509_CRL_get_issuer(x)));
|
||||
}
|
||||
#endif
|
||||
if (lastupdate == i)
|
||||
{
|
||||
BIO_printf(bio_out,"lastUpdate=");
|
||||
|
||||
@@ -427,9 +427,9 @@ int MAIN(int argc, char **argv)
|
||||
goto end;
|
||||
}
|
||||
if (do_verify)
|
||||
r = EVP_DigestVerifyInit(mctx, &pctx, md, e, sigkey);
|
||||
r = EVP_DigestVerifyInit(mctx, &pctx, md, NULL, sigkey);
|
||||
else
|
||||
r = EVP_DigestSignInit(mctx, &pctx, md, e, sigkey);
|
||||
r = EVP_DigestSignInit(mctx, &pctx, md, NULL, sigkey);
|
||||
if (!r)
|
||||
{
|
||||
BIO_printf(bio_err, "Error setting context\n");
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
* in the asn1 der encoding
|
||||
* possible values: named_curve (default)
|
||||
* explicit
|
||||
* -no_seed - if 'explicit' parameters are choosen do not use the seed
|
||||
* -no_seed - if 'explicit' parameters are chosen do not use the seed
|
||||
* -genkey - generate ec key
|
||||
* -rand file - files to use for random number input
|
||||
* -engine e - use engine e, possibly a hardware device
|
||||
@@ -286,7 +286,7 @@ bad:
|
||||
BIO_printf(bio_err, " "
|
||||
" explicit\n");
|
||||
BIO_printf(bio_err, " -no_seed if 'explicit'"
|
||||
" parameters are choosen do not"
|
||||
" parameters are chosen do not"
|
||||
" use the seed\n");
|
||||
BIO_printf(bio_err, " -genkey generate ec"
|
||||
" key\n");
|
||||
|
||||
@@ -331,6 +331,12 @@ bad:
|
||||
setup_engine(bio_err, engine, 0);
|
||||
#endif
|
||||
|
||||
if (cipher && EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER)
|
||||
{
|
||||
BIO_printf(bio_err, "AEAD ciphers not supported by the enc utility\n");
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (md && (dgst=EVP_get_digestbyname(md)) == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"%s is an unsupported message digest type\n",md);
|
||||
|
||||
22
apps/ocsp.c
22
apps/ocsp.c
@@ -127,6 +127,7 @@ int MAIN(int argc, char **argv)
|
||||
ENGINE *e = NULL;
|
||||
char **args;
|
||||
char *host = NULL, *port = NULL, *path = "/";
|
||||
char *thost = NULL, *tport = NULL, *tpath = NULL;
|
||||
char *reqin = NULL, *respin = NULL;
|
||||
char *reqout = NULL, *respout = NULL;
|
||||
char *signfile = NULL, *keyfile = NULL;
|
||||
@@ -204,6 +205,12 @@ int MAIN(int argc, char **argv)
|
||||
}
|
||||
else if (!strcmp(*args, "-url"))
|
||||
{
|
||||
if (thost)
|
||||
OPENSSL_free(thost);
|
||||
if (tport)
|
||||
OPENSSL_free(tport);
|
||||
if (tpath)
|
||||
OPENSSL_free(tpath);
|
||||
if (args[1])
|
||||
{
|
||||
args++;
|
||||
@@ -212,6 +219,9 @@ int MAIN(int argc, char **argv)
|
||||
BIO_printf(bio_err, "Error parsing URL\n");
|
||||
badarg = 1;
|
||||
}
|
||||
thost = host;
|
||||
tport = port;
|
||||
tpath = path;
|
||||
}
|
||||
else badarg = 1;
|
||||
}
|
||||
@@ -920,12 +930,12 @@ end:
|
||||
sk_X509_pop_free(verify_other, X509_free);
|
||||
sk_CONF_VALUE_pop_free(headers, X509V3_conf_free);
|
||||
|
||||
if (use_ssl != -1)
|
||||
{
|
||||
OPENSSL_free(host);
|
||||
OPENSSL_free(port);
|
||||
OPENSSL_free(path);
|
||||
}
|
||||
if (thost)
|
||||
OPENSSL_free(thost);
|
||||
if (tport)
|
||||
OPENSSL_free(tport);
|
||||
if (tpath)
|
||||
OPENSSL_free(tpath);
|
||||
|
||||
OPENSSL_EXIT(ret);
|
||||
}
|
||||
|
||||
28
apps/req.c
28
apps/req.c
@@ -644,6 +644,11 @@ bad:
|
||||
if (inrand)
|
||||
app_RAND_load_files(inrand);
|
||||
|
||||
if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey))
|
||||
{
|
||||
newkey=DEFAULT_KEY_LENGTH;
|
||||
}
|
||||
|
||||
if (keyalg)
|
||||
{
|
||||
genctx = set_keygen_ctx(bio_err, keyalg, &pkey_type, &newkey,
|
||||
@@ -652,12 +657,6 @@ bad:
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (newkey <= 0)
|
||||
{
|
||||
if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey))
|
||||
newkey=DEFAULT_KEY_LENGTH;
|
||||
}
|
||||
|
||||
if (newkey < MIN_KEY_LENGTH && (pkey_type == EVP_PKEY_RSA || pkey_type == EVP_PKEY_DSA))
|
||||
{
|
||||
BIO_printf(bio_err,"private key length is too short,\n");
|
||||
@@ -1490,7 +1489,13 @@ start:
|
||||
#ifdef CHARSET_EBCDIC
|
||||
ebcdic2ascii(buf, buf, i);
|
||||
#endif
|
||||
if(!req_check_len(i, n_min, n_max)) goto start;
|
||||
if(!req_check_len(i, n_min, n_max))
|
||||
{
|
||||
if (batch || value)
|
||||
return 0;
|
||||
goto start;
|
||||
}
|
||||
|
||||
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
|
||||
(unsigned char *) buf, -1,-1,mval)) goto err;
|
||||
ret=1;
|
||||
@@ -1549,7 +1554,12 @@ start:
|
||||
#ifdef CHARSET_EBCDIC
|
||||
ebcdic2ascii(buf, buf, i);
|
||||
#endif
|
||||
if(!req_check_len(i, n_min, n_max)) goto start;
|
||||
if(!req_check_len(i, n_min, n_max))
|
||||
{
|
||||
if (batch || value)
|
||||
return 0;
|
||||
goto start;
|
||||
}
|
||||
|
||||
if(!X509_REQ_add1_attr_by_NID(req, nid, chtype,
|
||||
(unsigned char *)buf, -1)) {
|
||||
@@ -1649,6 +1659,8 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type,
|
||||
keylen = atol(p + 1);
|
||||
*pkeylen = keylen;
|
||||
}
|
||||
else
|
||||
keylen = *pkeylen;
|
||||
}
|
||||
else if (p)
|
||||
paramfile = p + 1;
|
||||
|
||||
@@ -747,6 +747,10 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
|
||||
break;
|
||||
#endif
|
||||
|
||||
case TLSEXT_TYPE_padding:
|
||||
extname = "TLS padding";
|
||||
break;
|
||||
|
||||
default:
|
||||
extname = "unknown";
|
||||
break;
|
||||
|
||||
@@ -274,7 +274,7 @@ static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
|
||||
{
|
||||
i=0;
|
||||
i=setsockopt(s,SOL_SOCKET,SO_KEEPALIVE,(char *)&i,sizeof(i));
|
||||
if (i < 0) { perror("keepalive"); return(0); }
|
||||
if (i < 0) { closesocket(s); perror("keepalive"); return(0); }
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -450,6 +450,7 @@ redoit:
|
||||
if ((*host=(char *)OPENSSL_malloc(strlen(h1->h_name)+1)) == NULL)
|
||||
{
|
||||
perror("OPENSSL_malloc");
|
||||
closesocket(ret);
|
||||
return(0);
|
||||
}
|
||||
BUF_strlcpy(*host,h1->h_name,strlen(h1->h_name)+1);
|
||||
@@ -458,11 +459,13 @@ redoit:
|
||||
if (h2 == NULL)
|
||||
{
|
||||
BIO_printf(bio_err,"gethostbyname failure\n");
|
||||
closesocket(ret);
|
||||
return(0);
|
||||
}
|
||||
if (h2->h_addrtype != AF_INET)
|
||||
{
|
||||
BIO_printf(bio_err,"gethostbyname addr is not AF_INET\n");
|
||||
closesocket(ret);
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -541,8 +541,8 @@ int MAIN(int argc, char **argv)
|
||||
{
|
||||
if (!cipher)
|
||||
{
|
||||
#ifndef OPENSSL_NO_RC2
|
||||
cipher = EVP_rc2_40_cbc();
|
||||
#ifndef OPENSSL_NO_DES
|
||||
cipher = EVP_des_ede3_cbc();
|
||||
#else
|
||||
BIO_printf(bio_err, "No cipher selected\n");
|
||||
goto end;
|
||||
|
||||
@@ -1060,7 +1060,7 @@ _vpaes_consts:
|
||||
.Lk_dsbo: # decryption sbox final output
|
||||
.quad 0x1387EA537EF94000, 0xC7AA6DB9D4943E2D
|
||||
.quad 0x12D7560F93441D00, 0xCA4B8159D8C58E9C
|
||||
.asciz "Vector Permutaion AES for x86_64/SSSE3, Mike Hamburg (Stanford University)"
|
||||
.asciz "Vector Permutation AES for x86_64/SSSE3, Mike Hamburg (Stanford University)"
|
||||
.align 64
|
||||
.size _vpaes_consts,.-_vpaes_consts
|
||||
___
|
||||
|
||||
@@ -74,7 +74,7 @@ static int sk_table_cmp(const ASN1_STRING_TABLE * const *a,
|
||||
* certain software (e.g. Netscape) has problems with them.
|
||||
*/
|
||||
|
||||
static unsigned long global_mask = 0xFFFFFFFFL;
|
||||
static unsigned long global_mask = B_ASN1_UTF8STRING;
|
||||
|
||||
void ASN1_STRING_set_default_mask(unsigned long mask)
|
||||
{
|
||||
|
||||
@@ -305,7 +305,7 @@ static ERR_STRING_DATA ASN1_str_reasons[]=
|
||||
{ERR_REASON(ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE),"unknown public key type"},
|
||||
{ERR_REASON(ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM),"unknown signature algorithm"},
|
||||
{ERR_REASON(ASN1_R_UNKNOWN_TAG) ,"unknown tag"},
|
||||
{ERR_REASON(ASN1_R_UNKOWN_FORMAT) ,"unkown format"},
|
||||
{ERR_REASON(ASN1_R_UNKOWN_FORMAT) ,"unknown format"},
|
||||
{ERR_REASON(ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE),"unsupported any defined by type"},
|
||||
{ERR_REASON(ASN1_R_UNSUPPORTED_CIPHER) ,"unsupported cipher"},
|
||||
{ERR_REASON(ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM),"unsupported encryption algorithm"},
|
||||
|
||||
@@ -1333,7 +1333,7 @@ static long dgram_sctp_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
bio_dgram_sctp_data *data = NULL;
|
||||
socklen_t sockopt_len = 0;
|
||||
struct sctp_authkeyid authkeyid;
|
||||
struct sctp_authkey *authkey;
|
||||
struct sctp_authkey *authkey = NULL;
|
||||
|
||||
data = (bio_dgram_sctp_data *)b->ptr;
|
||||
|
||||
@@ -1388,6 +1388,11 @@ static long dgram_sctp_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
/* Add new key */
|
||||
sockopt_len = sizeof(struct sctp_authkey) + 64 * sizeof(uint8_t);
|
||||
authkey = OPENSSL_malloc(sockopt_len);
|
||||
if (authkey == NULL)
|
||||
{
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
memset(authkey, 0x00, sockopt_len);
|
||||
authkey->sca_keynumber = authkeyid.scact_keynumber + 1;
|
||||
#ifndef __FreeBSD__
|
||||
@@ -1399,6 +1404,8 @@ static long dgram_sctp_ctrl(BIO *b, int cmd, long num, void *ptr)
|
||||
memcpy(&authkey->sca_key[0], ptr, 64 * sizeof(uint8_t));
|
||||
|
||||
ret = setsockopt(b->num, IPPROTO_SCTP, SCTP_AUTH_KEY, authkey, sockopt_len);
|
||||
OPENSSL_free(authkey);
|
||||
authkey = NULL;
|
||||
if (ret < 0) break;
|
||||
|
||||
/* Reset active key */
|
||||
|
||||
@@ -245,7 +245,7 @@ static int MS_CALLBACK slg_puts(BIO *bp, const char *str)
|
||||
|
||||
static void xopenlog(BIO* bp, char* name, int level)
|
||||
{
|
||||
if (GetVersion() < 0x80000000)
|
||||
if (check_winnt())
|
||||
bp->ptr = RegisterEventSourceA(NULL,name);
|
||||
else
|
||||
bp->ptr = NULL;
|
||||
|
||||
@@ -538,6 +538,8 @@ BIGNUM *BN_mod_inverse(BIGNUM *ret,
|
||||
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
||||
const BIGNUM *a, const BIGNUM *n,BN_CTX *ctx);
|
||||
|
||||
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
||||
|
||||
/* Deprecated versions */
|
||||
#ifndef OPENSSL_NO_DEPRECATED
|
||||
BIGNUM *BN_generate_prime(BIGNUM *ret,int bits,int safe,
|
||||
@@ -774,11 +776,20 @@ int RAND_pseudo_bytes(unsigned char *buf,int num);
|
||||
|
||||
#define bn_fix_top(a) bn_check_top(a)
|
||||
|
||||
#define bn_check_size(bn, bits) bn_wcheck_size(bn, ((bits+BN_BITS2-1))/BN_BITS2)
|
||||
#define bn_wcheck_size(bn, words) \
|
||||
do { \
|
||||
const BIGNUM *_bnum2 = (bn); \
|
||||
assert(words <= (_bnum2)->dmax && words >= (_bnum2)->top); \
|
||||
} while(0)
|
||||
|
||||
#else /* !BN_DEBUG */
|
||||
|
||||
#define bn_pollute(a)
|
||||
#define bn_check_top(a)
|
||||
#define bn_fix_top(a) bn_correct_top(a)
|
||||
#define bn_check_size(bn, bits)
|
||||
#define bn_wcheck_size(bn, words)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -824,3 +824,55 @@ int bn_cmp_part_words(const BN_ULONG *a, const BN_ULONG *b,
|
||||
}
|
||||
return bn_cmp_words(a,b,cl);
|
||||
}
|
||||
|
||||
/*
|
||||
* Constant-time conditional swap of a and b.
|
||||
* a and b are swapped if condition is not 0. The code assumes that at most one bit of condition is set.
|
||||
* nwords is the number of words to swap. The code assumes that at least nwords are allocated in both a and b,
|
||||
* and that no more than nwords are used by either a or b.
|
||||
* a and b cannot be the same number
|
||||
*/
|
||||
void BN_consttime_swap(BN_ULONG condition, BIGNUM *a, BIGNUM *b, int nwords)
|
||||
{
|
||||
BN_ULONG t;
|
||||
int i;
|
||||
|
||||
bn_wcheck_size(a, nwords);
|
||||
bn_wcheck_size(b, nwords);
|
||||
|
||||
assert(a != b);
|
||||
assert((condition & (condition - 1)) == 0);
|
||||
assert(sizeof(BN_ULONG) >= sizeof(int));
|
||||
|
||||
condition = ((condition - 1) >> (BN_BITS2 - 1)) - 1;
|
||||
|
||||
t = (a->top^b->top) & condition;
|
||||
a->top ^= t;
|
||||
b->top ^= t;
|
||||
|
||||
#define BN_CONSTTIME_SWAP(ind) \
|
||||
do { \
|
||||
t = (a->d[ind] ^ b->d[ind]) & condition; \
|
||||
a->d[ind] ^= t; \
|
||||
b->d[ind] ^= t; \
|
||||
} while (0)
|
||||
|
||||
|
||||
switch (nwords) {
|
||||
default:
|
||||
for (i = 10; i < nwords; i++)
|
||||
BN_CONSTTIME_SWAP(i);
|
||||
/* Fallthrough */
|
||||
case 10: BN_CONSTTIME_SWAP(9); /* Fallthrough */
|
||||
case 9: BN_CONSTTIME_SWAP(8); /* Fallthrough */
|
||||
case 8: BN_CONSTTIME_SWAP(7); /* Fallthrough */
|
||||
case 7: BN_CONSTTIME_SWAP(6); /* Fallthrough */
|
||||
case 6: BN_CONSTTIME_SWAP(5); /* Fallthrough */
|
||||
case 5: BN_CONSTTIME_SWAP(4); /* Fallthrough */
|
||||
case 4: BN_CONSTTIME_SWAP(3); /* Fallthrough */
|
||||
case 3: BN_CONSTTIME_SWAP(2); /* Fallthrough */
|
||||
case 2: BN_CONSTTIME_SWAP(1); /* Fallthrough */
|
||||
case 1: BN_CONSTTIME_SWAP(0);
|
||||
}
|
||||
#undef BN_CONSTTIME_SWAP
|
||||
}
|
||||
|
||||
@@ -478,32 +478,38 @@ BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from)
|
||||
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, int lock,
|
||||
const BIGNUM *mod, BN_CTX *ctx)
|
||||
{
|
||||
int got_write_lock = 0;
|
||||
BN_MONT_CTX *ret;
|
||||
|
||||
CRYPTO_r_lock(lock);
|
||||
if (!*pmont)
|
||||
{
|
||||
CRYPTO_r_unlock(lock);
|
||||
CRYPTO_w_lock(lock);
|
||||
got_write_lock = 1;
|
||||
|
||||
if (!*pmont)
|
||||
{
|
||||
ret = BN_MONT_CTX_new();
|
||||
if (ret && !BN_MONT_CTX_set(ret, mod, ctx))
|
||||
BN_MONT_CTX_free(ret);
|
||||
else
|
||||
*pmont = ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = *pmont;
|
||||
|
||||
if (got_write_lock)
|
||||
CRYPTO_w_unlock(lock);
|
||||
CRYPTO_r_unlock(lock);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* We don't want to serialise globally while doing our lazy-init math in
|
||||
* BN_MONT_CTX_set. That punishes threads that are doing independent
|
||||
* things. Instead, punish the case where more than one thread tries to
|
||||
* lazy-init the same 'pmont', by having each do the lazy-init math work
|
||||
* independently and only use the one from the thread that wins the race
|
||||
* (the losers throw away the work they've done). */
|
||||
ret = BN_MONT_CTX_new();
|
||||
if (!ret)
|
||||
return NULL;
|
||||
if (!BN_MONT_CTX_set(ret, mod, ctx))
|
||||
{
|
||||
BN_MONT_CTX_free(ret);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* The locked compare-and-set, after the local work is done. */
|
||||
CRYPTO_w_lock(lock);
|
||||
if (*pmont)
|
||||
{
|
||||
BN_MONT_CTX_free(ret);
|
||||
ret = *pmont;
|
||||
}
|
||||
else
|
||||
CRYPTO_r_unlock(lock);
|
||||
|
||||
*pmont = ret;
|
||||
CRYPTO_w_unlock(lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -185,6 +185,8 @@ CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
||||
if (flags & CMS_USE_KEYID)
|
||||
{
|
||||
ktri->version = 2;
|
||||
if (env->version < 2)
|
||||
env->version = 2;
|
||||
type = CMS_RECIPINFO_KEYIDENTIFIER;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -463,8 +463,6 @@ int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert)
|
||||
STACK_OF(CMS_CertificateChoices) **pcerts;
|
||||
int i;
|
||||
pcerts = cms_get0_certificate_choices(cms);
|
||||
if (!pcerts)
|
||||
return 0;
|
||||
if (!pcerts)
|
||||
return 0;
|
||||
for (i = 0; i < sk_CMS_CertificateChoices_num(*pcerts); i++)
|
||||
|
||||
@@ -158,8 +158,8 @@ static void cms_sd_set_version(CMS_SignedData *sd)
|
||||
if (sd->version < 3)
|
||||
sd->version = 3;
|
||||
}
|
||||
else
|
||||
sd->version = 1;
|
||||
else if (si->version < 1)
|
||||
si->version = 1;
|
||||
}
|
||||
|
||||
if (sd->version < 1)
|
||||
|
||||
@@ -611,7 +611,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert)
|
||||
STACK_OF(CMS_RecipientInfo) *ris;
|
||||
CMS_RecipientInfo *ri;
|
||||
int i, r;
|
||||
int debug = 0;
|
||||
int debug = 0, ri_match = 0;
|
||||
ris = CMS_get0_RecipientInfos(cms);
|
||||
if (ris)
|
||||
debug = cms->d.envelopedData->encryptedContentInfo->debug;
|
||||
@@ -620,6 +620,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert)
|
||||
ri = sk_CMS_RecipientInfo_value(ris, i);
|
||||
if (CMS_RecipientInfo_type(ri) != CMS_RECIPINFO_TRANS)
|
||||
continue;
|
||||
ri_match = 1;
|
||||
/* If we have a cert try matching RecipientInfo
|
||||
* otherwise try them all.
|
||||
*/
|
||||
@@ -655,7 +656,7 @@ int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert)
|
||||
}
|
||||
}
|
||||
/* If no cert and not debugging always return success */
|
||||
if (!cert && !debug)
|
||||
if (ri_match && !cert && !debug)
|
||||
{
|
||||
ERR_clear_error();
|
||||
return 1;
|
||||
|
||||
@@ -889,7 +889,7 @@ void OPENSSL_showfatal (const char *fmta,...)
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT>=0x0333
|
||||
/* this -------------v--- guards NT-specific calls */
|
||||
if (GetVersion() < 0x80000000 && OPENSSL_isservice() > 0)
|
||||
if (check_winnt() && OPENSSL_isservice() > 0)
|
||||
{ HANDLE h = RegisterEventSource(0,_T("OPENSSL"));
|
||||
const TCHAR *pmsg=buf;
|
||||
ReportEvent(h,EVENTLOG_ERROR_TYPE,0,0,0,1,0,&pmsg,0);
|
||||
|
||||
@@ -464,7 +464,7 @@ static int dlfcn_pathbyaddr(void *addr,char *path,int sz)
|
||||
return len;
|
||||
}
|
||||
|
||||
ERR_add_error_data(4, "dlfcn_pathbyaddr(): ", dlerror());
|
||||
ERR_add_error_data(2, "dlfcn_pathbyaddr(): ", dlerror());
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,14 @@
|
||||
#include <errno.h>
|
||||
#include "cryptlib.h"
|
||||
#include <openssl/dso.h>
|
||||
#ifdef OPENSSL_SYS_VMS
|
||||
|
||||
#ifndef OPENSSL_SYS_VMS
|
||||
DSO_METHOD *DSO_METHOD_vms(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
|
||||
#pragma message disable DOLLARID
|
||||
#include <rms.h>
|
||||
#include <lib$routines.h>
|
||||
@@ -69,7 +76,6 @@
|
||||
#include <descrip.h>
|
||||
#include <starlet.h>
|
||||
#include "vms_rms.h"
|
||||
#endif
|
||||
|
||||
/* Some compiler options may mask the declaration of "_malloc32". */
|
||||
#if __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE
|
||||
@@ -82,12 +88,6 @@
|
||||
#endif /* __INITIAL_POINTER_SIZE && defined _ANSI_C_SOURCE */
|
||||
|
||||
|
||||
#ifndef OPENSSL_SYS_VMS
|
||||
DSO_METHOD *DSO_METHOD_vms(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#else
|
||||
#pragma message disable DOLLARID
|
||||
|
||||
static int vms_load(DSO *dso);
|
||||
|
||||
@@ -208,11 +208,15 @@ static int gf2m_Mxy(const EC_GROUP *group, const BIGNUM *x, const BIGNUM *y, BIG
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* Computes scalar*point and stores the result in r.
|
||||
* point can not equal r.
|
||||
* Uses algorithm 2P of
|
||||
* Uses a modified algorithm 2P of
|
||||
* Lopez, J. and Dahab, R. "Fast multiplication on elliptic curves over
|
||||
* GF(2^m) without precomputation" (CHES '99, LNCS 1717).
|
||||
*
|
||||
* To protect against side-channel attack the function uses constant time swap,
|
||||
* avoiding conditional branches.
|
||||
*/
|
||||
static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
|
||||
const EC_POINT *point, BN_CTX *ctx)
|
||||
@@ -246,6 +250,11 @@ static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r,
|
||||
x2 = &r->X;
|
||||
z2 = &r->Y;
|
||||
|
||||
bn_wexpand(x1, group->field.top);
|
||||
bn_wexpand(z1, group->field.top);
|
||||
bn_wexpand(x2, group->field.top);
|
||||
bn_wexpand(z2, group->field.top);
|
||||
|
||||
if (!BN_GF2m_mod_arr(x1, &point->X, group->poly)) goto err; /* x1 = x */
|
||||
if (!BN_one(z1)) goto err; /* z1 = 1 */
|
||||
if (!group->meth->field_sqr(group, z2, x1, ctx)) goto err; /* z2 = x1^2 = x^2 */
|
||||
@@ -270,16 +279,12 @@ static int ec_GF2m_montgomery_point_multiply(const EC_GROUP *group, EC_POINT *r,
|
||||
word = scalar->d[i];
|
||||
while (mask)
|
||||
{
|
||||
if (word & mask)
|
||||
{
|
||||
if (!gf2m_Madd(group, &point->X, x1, z1, x2, z2, ctx)) goto err;
|
||||
if (!gf2m_Mdouble(group, x2, z2, ctx)) goto err;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err;
|
||||
if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err;
|
||||
}
|
||||
BN_consttime_swap(word & mask, x1, x2, group->field.top);
|
||||
BN_consttime_swap(word & mask, z1, z2, group->field.top);
|
||||
if (!gf2m_Madd(group, &point->X, x2, z2, x1, z1, ctx)) goto err;
|
||||
if (!gf2m_Mdouble(group, x1, z1, ctx)) goto err;
|
||||
BN_consttime_swap(word & mask, x1, x2, group->field.top);
|
||||
BN_consttime_swap(word & mask, z1, z2, group->field.top);
|
||||
mask >>= 1;
|
||||
}
|
||||
mask = BN_TBIT;
|
||||
|
||||
@@ -352,6 +352,7 @@ static int eckey_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey)
|
||||
EC_KEY_set_enc_flags(ec_key, old_flags);
|
||||
OPENSSL_free(ep);
|
||||
ECerr(EC_F_ECKEY_PRIV_ENCODE, ERR_R_EC_LIB);
|
||||
return 0;
|
||||
}
|
||||
/* restore old encoding flags */
|
||||
EC_KEY_set_enc_flags(ec_key, old_flags);
|
||||
|
||||
@@ -1435,8 +1435,11 @@ int i2o_ECPublicKey(EC_KEY *a, unsigned char **out)
|
||||
*out, buf_len, NULL))
|
||||
{
|
||||
ECerr(EC_F_I2O_ECPUBLICKEY, ERR_R_EC_LIB);
|
||||
OPENSSL_free(*out);
|
||||
*out = NULL;
|
||||
if (new_buffer)
|
||||
{
|
||||
OPENSSL_free(*out);
|
||||
*out = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (!new_buffer)
|
||||
|
||||
@@ -404,7 +404,7 @@ int ec_GF2m_simple_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
|
||||
int ec_GF2m_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
|
||||
int ec_GF2m_have_precompute_mult(const EC_GROUP *group);
|
||||
|
||||
#ifndef OPENSSL_EC_NISTP_64_GCC_128
|
||||
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
||||
/* method functions in ecp_nistp224.c */
|
||||
int ec_GFp_nistp224_group_init(EC_GROUP *group);
|
||||
int ec_GFp_nistp224_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *n, BN_CTX *);
|
||||
|
||||
@@ -408,6 +408,7 @@ ENGINE *ENGINE_by_id(const char *id)
|
||||
!ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) ||
|
||||
!ENGINE_ctrl_cmd_string(iterator, "DIR_ADD",
|
||||
load_dir, 0) ||
|
||||
!ENGINE_ctrl_cmd_string(iterator, "LIST_ADD", "1", 0) ||
|
||||
!ENGINE_ctrl_cmd_string(iterator, "LOAD", NULL, 0))
|
||||
goto notfound;
|
||||
return iterator;
|
||||
|
||||
@@ -226,6 +226,7 @@ static int b64_read(BIO *b, char *out, int outl)
|
||||
else if (ctx->start)
|
||||
{
|
||||
q=p=(unsigned char *)ctx->tmp;
|
||||
num = 0;
|
||||
for (j=0; j<i; j++)
|
||||
{
|
||||
if (*(q++) != '\n') continue;
|
||||
@@ -264,7 +265,7 @@ static int b64_read(BIO *b, char *out, int outl)
|
||||
}
|
||||
|
||||
/* we fell off the end without starting */
|
||||
if (j == i)
|
||||
if ((j == i) && (num == 0))
|
||||
{
|
||||
/* Is this is one long chunk?, if so, keep on
|
||||
* reading until a new line. */
|
||||
|
||||
@@ -324,6 +324,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
|
||||
v=EVP_DecodeBlock(out,d,n);
|
||||
n=0;
|
||||
if (v < 0) { rv=0; goto end; }
|
||||
if (eof > v) { rv=-1; goto end; }
|
||||
ret+=(v-eof);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -810,7 +810,11 @@ void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx,const unsigned char *iv,size_t len)
|
||||
GCM_MUL(ctx,Yi);
|
||||
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctr = BSWAP4(ctx->Yi.d[3]);
|
||||
#else
|
||||
ctr = GETU32(ctx->Yi.c+12);
|
||||
#endif
|
||||
else
|
||||
ctr = ctx->Yi.d[3];
|
||||
}
|
||||
@@ -818,7 +822,11 @@ void CRYPTO_gcm128_setiv(GCM128_CONTEXT *ctx,const unsigned char *iv,size_t len)
|
||||
(*ctx->block)(ctx->Yi.c,ctx->EK0.c,ctx->key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
}
|
||||
@@ -913,7 +921,11 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
|
||||
}
|
||||
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctr = BSWAP4(ctx->Yi.d[3]);
|
||||
#else
|
||||
ctr = GETU32(ctx->Yi.c+12);
|
||||
#endif
|
||||
else
|
||||
ctr = ctx->Yi.d[3];
|
||||
|
||||
@@ -947,7 +959,11 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
for (i=0; i<16/sizeof(size_t); ++i)
|
||||
@@ -969,7 +985,11 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
for (i=0; i<16/sizeof(size_t); ++i)
|
||||
@@ -988,7 +1008,11 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
for (i=0; i<16/sizeof(size_t); ++i)
|
||||
@@ -1004,7 +1028,11 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
while (len--) {
|
||||
@@ -1022,7 +1050,11 @@ int CRYPTO_gcm128_encrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
}
|
||||
@@ -1066,7 +1098,11 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
|
||||
}
|
||||
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctr = BSWAP4(ctx->Yi.d[3]);
|
||||
#else
|
||||
ctr = GETU32(ctx->Yi.c+12);
|
||||
#endif
|
||||
else
|
||||
ctr = ctx->Yi.d[3];
|
||||
|
||||
@@ -1103,7 +1139,11 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
for (i=0; i<16/sizeof(size_t); ++i)
|
||||
@@ -1123,7 +1163,11 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
for (i=0; i<16/sizeof(size_t); ++i)
|
||||
@@ -1141,7 +1185,11 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
for (i=0; i<16/sizeof(size_t); ++i) {
|
||||
@@ -1159,7 +1207,11 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
while (len--) {
|
||||
@@ -1180,7 +1232,11 @@ int CRYPTO_gcm128_decrypt(GCM128_CONTEXT *ctx,
|
||||
(*block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
}
|
||||
@@ -1225,7 +1281,11 @@ int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
}
|
||||
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctr = BSWAP4(ctx->Yi.d[3]);
|
||||
#else
|
||||
ctr = GETU32(ctx->Yi.c+12);
|
||||
#endif
|
||||
else
|
||||
ctr = ctx->Yi.d[3];
|
||||
|
||||
@@ -1247,7 +1307,11 @@ int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
(*stream)(in,out,GHASH_CHUNK/16,key,ctx->Yi.c);
|
||||
ctr += GHASH_CHUNK/16;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
GHASH(ctx,out,GHASH_CHUNK);
|
||||
@@ -1262,7 +1326,11 @@ int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
(*stream)(in,out,j,key,ctx->Yi.c);
|
||||
ctr += (unsigned int)j;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
in += i;
|
||||
@@ -1282,7 +1350,11 @@ int CRYPTO_gcm128_encrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
(*ctx->block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
while (len--) {
|
||||
@@ -1324,7 +1396,11 @@ int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
}
|
||||
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctr = BSWAP4(ctx->Yi.d[3]);
|
||||
#else
|
||||
ctr = GETU32(ctx->Yi.c+12);
|
||||
#endif
|
||||
else
|
||||
ctr = ctx->Yi.d[3];
|
||||
|
||||
@@ -1349,7 +1425,11 @@ int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
(*stream)(in,out,GHASH_CHUNK/16,key,ctx->Yi.c);
|
||||
ctr += GHASH_CHUNK/16;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
out += GHASH_CHUNK;
|
||||
@@ -1375,7 +1455,11 @@ int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
(*stream)(in,out,j,key,ctx->Yi.c);
|
||||
ctr += (unsigned int)j;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
out += i;
|
||||
@@ -1386,7 +1470,11 @@ int CRYPTO_gcm128_decrypt_ctr32(GCM128_CONTEXT *ctx,
|
||||
(*ctx->block)(ctx->Yi.c,ctx->EKi.c,key);
|
||||
++ctr;
|
||||
if (is_endian.little)
|
||||
#ifdef BSWAP4
|
||||
ctx->Yi.d[3] = BSWAP4(ctr);
|
||||
#else
|
||||
PUTU32(ctx->Yi.c+12,ctr);
|
||||
#endif
|
||||
else
|
||||
ctx->Yi.d[3] = ctr;
|
||||
while (len--) {
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
* (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for
|
||||
* major minor fix final patch/beta)
|
||||
*/
|
||||
#define OPENSSL_VERSION_NUMBER 0x1000106fL
|
||||
#define OPENSSL_VERSION_NUMBER 0x1000108fL
|
||||
#ifdef OPENSSL_FIPS
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1f-fips 6 Jan 2014"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1h-fips 5 Jun 2014"
|
||||
#else
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1f 6 Jan 2014"
|
||||
#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1h 5 Jun 2014"
|
||||
#endif
|
||||
#define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT
|
||||
|
||||
|
||||
@@ -96,7 +96,11 @@ PKCS12 *PKCS12_create(char *pass, char *name, EVP_PKEY *pkey, X509 *cert,
|
||||
nid_cert = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
else
|
||||
#endif
|
||||
#ifdef OPENSSL_NO_RC2
|
||||
nid_cert = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
#else
|
||||
nid_cert = NID_pbe_WithSHA1And40BitRC2_CBC;
|
||||
#endif
|
||||
}
|
||||
if (!nid_key)
|
||||
nid_key = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
@@ -286,7 +290,11 @@ int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags,
|
||||
free_safes = 0;
|
||||
|
||||
if (nid_safe == 0)
|
||||
#ifdef OPENSSL_NO_RC2
|
||||
nid_safe = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
|
||||
#else
|
||||
nid_safe = NID_pbe_WithSHA1And40BitRC2_CBC;
|
||||
#endif
|
||||
|
||||
if (nid_safe == -1)
|
||||
p7 = PKCS12_pack_p7data(bags);
|
||||
|
||||
@@ -269,7 +269,7 @@ static int parse_bag(PKCS12_SAFEBAG *bag, const char *pass, int passlen,
|
||||
int len, r;
|
||||
unsigned char *data;
|
||||
len = ASN1_STRING_to_UTF8(&data, fname);
|
||||
if(len > 0) {
|
||||
if(len >= 0) {
|
||||
r = X509_alias_set1(x509, data, len);
|
||||
OPENSSL_free(data);
|
||||
if (!r)
|
||||
|
||||
@@ -440,6 +440,11 @@ BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
|
||||
{
|
||||
case NID_pkcs7_signed:
|
||||
data_body=PKCS7_get_octet_string(p7->d.sign->contents);
|
||||
if (!PKCS7_is_detached(p7) && data_body == NULL)
|
||||
{
|
||||
PKCS7err(PKCS7_F_PKCS7_DATADECODE,PKCS7_R_INVALID_SIGNED_DATA_TYPE);
|
||||
goto err;
|
||||
}
|
||||
md_sk=p7->d.sign->md_algs;
|
||||
break;
|
||||
case NID_pkcs7_signedAndEnveloped:
|
||||
@@ -928,6 +933,7 @@ int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si)
|
||||
if (EVP_DigestSignUpdate(&mctx,abuf,alen) <= 0)
|
||||
goto err;
|
||||
OPENSSL_free(abuf);
|
||||
abuf = NULL;
|
||||
if (EVP_DigestSignFinal(&mctx, NULL, &siglen) <= 0)
|
||||
goto err;
|
||||
abuf = OPENSSL_malloc(siglen);
|
||||
|
||||
@@ -453,6 +453,7 @@ void ERR_load_PKCS7_strings(void);
|
||||
#define PKCS7_R_ERROR_SETTING_CIPHER 121
|
||||
#define PKCS7_R_INVALID_MIME_TYPE 131
|
||||
#define PKCS7_R_INVALID_NULL_POINTER 143
|
||||
#define PKCS7_R_INVALID_SIGNED_DATA_TYPE 155
|
||||
#define PKCS7_R_MIME_NO_CONTENT_TYPE 132
|
||||
#define PKCS7_R_MIME_PARSE_ERROR 133
|
||||
#define PKCS7_R_MIME_SIG_PARSE_ERROR 134
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* crypto/pkcs7/pkcs7err.c */
|
||||
/* ====================================================================
|
||||
* Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved.
|
||||
* Copyright (c) 1999-2014 The OpenSSL Project. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -130,6 +130,7 @@ static ERR_STRING_DATA PKCS7_str_reasons[]=
|
||||
{ERR_REASON(PKCS7_R_ERROR_SETTING_CIPHER),"error setting cipher"},
|
||||
{ERR_REASON(PKCS7_R_INVALID_MIME_TYPE) ,"invalid mime type"},
|
||||
{ERR_REASON(PKCS7_R_INVALID_NULL_POINTER),"invalid null pointer"},
|
||||
{ERR_REASON(PKCS7_R_INVALID_SIGNED_DATA_TYPE),"invalid signed data type"},
|
||||
{ERR_REASON(PKCS7_R_MIME_NO_CONTENT_TYPE),"mime no content type"},
|
||||
{ERR_REASON(PKCS7_R_MIME_PARSE_ERROR) ,"mime parse error"},
|
||||
{ERR_REASON(PKCS7_R_MIME_SIG_PARSE_ERROR),"mime sig parse error"},
|
||||
|
||||
@@ -198,6 +198,9 @@ static void ssleay_rand_add(const void *buf, int num, double add)
|
||||
EVP_MD_CTX m;
|
||||
int do_not_lock;
|
||||
|
||||
if (!num)
|
||||
return;
|
||||
|
||||
/*
|
||||
* (Based on the rand(3) manpage)
|
||||
*
|
||||
|
||||
@@ -750,7 +750,7 @@ static void readscreen(void)
|
||||
int y; /* y-coordinate of screen lines to grab */
|
||||
int n = 16; /* number of screen lines to grab at a time */
|
||||
|
||||
if (GetVersion() < 0x80000000 && OPENSSL_isservice()>0)
|
||||
if (check_winnt() && OPENSSL_isservice()>0)
|
||||
return;
|
||||
|
||||
/* Create a screen DC and a memory DC compatible to screen DC */
|
||||
|
||||
@@ -358,7 +358,7 @@ static int rsa_pss_param_print(BIO *bp, RSA_PSS_PARAMS *pss,
|
||||
if (i2a_ASN1_INTEGER(bp, pss->saltLength) <= 0)
|
||||
goto err;
|
||||
}
|
||||
else if (BIO_puts(bp, "0x14 (default)") <= 0)
|
||||
else if (BIO_puts(bp, "14 (default)") <= 0)
|
||||
goto err;
|
||||
BIO_puts(bp, "\n");
|
||||
|
||||
|
||||
@@ -93,6 +93,9 @@ static int t_fromb64(unsigned char *a, const char *src)
|
||||
else a[i] = loc - b64table;
|
||||
++i;
|
||||
}
|
||||
/* if nothing valid to process we have a zero length response */
|
||||
if (i == 0)
|
||||
return 0;
|
||||
size = i;
|
||||
i = size - 1;
|
||||
j = size;
|
||||
|
||||
@@ -204,6 +204,12 @@
|
||||
#define SSL_CTX_set_next_protos_advertised_cb SSL_CTX_set_next_protos_adv_cb
|
||||
#undef SSL_CTX_set_next_proto_select_cb
|
||||
#define SSL_CTX_set_next_proto_select_cb SSL_CTX_set_next_proto_sel_cb
|
||||
#undef ssl3_cbc_record_digest_supported
|
||||
#define ssl3_cbc_record_digest_supported ssl3_cbc_record_digest_support
|
||||
#undef ssl_check_clienthello_tlsext_late
|
||||
#define ssl_check_clienthello_tlsext_late ssl_check_clihello_tlsext_late
|
||||
#undef ssl_check_clienthello_tlsext_early
|
||||
#define ssl_check_clienthello_tlsext_early ssl_check_clihello_tlsext_early
|
||||
|
||||
/* Hack some long ENGINE names */
|
||||
#undef ENGINE_get_default_BN_mod_exp_crt
|
||||
|
||||
@@ -629,6 +629,7 @@ static int TS_compute_imprint(BIO *data, TS_TST_INFO *tst_info,
|
||||
X509_ALGOR_free(*md_alg);
|
||||
OPENSSL_free(*imprint);
|
||||
*imprint_len = 0;
|
||||
*imprint = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type)
|
||||
|
||||
s=dir;
|
||||
p=s;
|
||||
for (;;p++)
|
||||
do
|
||||
{
|
||||
if ((*p == LIST_SEPARATOR_CHAR) || (*p == '\0'))
|
||||
{
|
||||
@@ -264,9 +264,7 @@ static int add_cert_dir(BY_DIR *ctx, const char *dir, int type)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (*p == '\0')
|
||||
break;
|
||||
}
|
||||
} while (*p++ != '\0');
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1462,10 +1462,9 @@ static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
|
||||
* a certificate was revoked. This has since been changed since
|
||||
* critical extension can change the meaning of CRL entries.
|
||||
*/
|
||||
if (crl->flags & EXFLAG_CRITICAL)
|
||||
if (!(ctx->param->flags & X509_V_FLAG_IGNORE_CRITICAL)
|
||||
&& (crl->flags & EXFLAG_CRITICAL))
|
||||
{
|
||||
if (ctx->param->flags & X509_V_FLAG_IGNORE_CRITICAL)
|
||||
return 1;
|
||||
ctx->error = X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION;
|
||||
ok = ctx->verify_cb(0, ctx);
|
||||
if(!ok)
|
||||
|
||||
@@ -389,8 +389,8 @@ static void x509v3_cache_extensions(X509 *x)
|
||||
/* Handle proxy certificates */
|
||||
if((pci=X509_get_ext_d2i(x, NID_proxyCertInfo, NULL, NULL))) {
|
||||
if (x->ex_flags & EXFLAG_CA
|
||||
|| X509_get_ext_by_NID(x, NID_subject_alt_name, 0) >= 0
|
||||
|| X509_get_ext_by_NID(x, NID_issuer_alt_name, 0) >= 0) {
|
||||
|| X509_get_ext_by_NID(x, NID_subject_alt_name, -1) >= 0
|
||||
|| X509_get_ext_by_NID(x, NID_issuer_alt_name, -1) >= 0) {
|
||||
x->ex_flags |= EXFLAG_INVALID;
|
||||
}
|
||||
if (pci->pcPathLengthConstraint) {
|
||||
@@ -670,7 +670,7 @@ static int check_purpose_timestamp_sign(const X509_PURPOSE *xp, const X509 *x,
|
||||
return 0;
|
||||
|
||||
/* Extended Key Usage MUST be critical */
|
||||
i_ext = X509_get_ext_by_NID((X509 *) x, NID_ext_key_usage, 0);
|
||||
i_ext = X509_get_ext_by_NID((X509 *) x, NID_ext_key_usage, -1);
|
||||
if (i_ext >= 0)
|
||||
{
|
||||
X509_EXTENSION *ext = X509_get_ext((X509 *) x, i_ext);
|
||||
|
||||
@@ -10,7 +10,7 @@ int main(int argc, char **argv)
|
||||
int ret = 1;
|
||||
|
||||
/*
|
||||
* On OpenSSL 0.9.9 only:
|
||||
* On OpenSSL 1.0.0+ only:
|
||||
* for streaming set CMS_STREAM
|
||||
*/
|
||||
int flags = CMS_STREAM;
|
||||
|
||||
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
|
||||
goto err;
|
||||
|
||||
/* Decrypt S/MIME message */
|
||||
if (!CMS_decrypt(cms, rkey, rcert, out, NULL, 0))
|
||||
if (!CMS_decrypt(cms, rkey, rcert, NULL, out, 0))
|
||||
goto err;
|
||||
|
||||
ret = 0;
|
||||
|
||||
@@ -12,7 +12,7 @@ int main(int argc, char **argv)
|
||||
int ret = 1;
|
||||
|
||||
/* For simple S/MIME signing use CMS_DETACHED.
|
||||
* On OpenSSL 0.9.9 only:
|
||||
* On OpenSSL 1.0.0 only:
|
||||
* for streaming detached set CMS_DETACHED|CMS_STREAM
|
||||
* for streaming non-detached set CMS_STREAM
|
||||
*/
|
||||
|
||||
@@ -90,6 +90,11 @@ decrypt mail using the supplied certificate and private key. Expects an
|
||||
encrypted mail message in MIME format for the input file. The decrypted mail
|
||||
is written to the output file.
|
||||
|
||||
=item B<-debug_decrypt>
|
||||
|
||||
this option sets the B<CMS_DEBUG_DECRYPT> flag. This option should be used
|
||||
with caution: see the notes section below.
|
||||
|
||||
=item B<-sign>
|
||||
|
||||
sign mail using the supplied certificate and private key. Input file is
|
||||
@@ -446,32 +451,42 @@ Streaming is always used for the B<-sign> operation with detached data but
|
||||
since the content is no longer part of the CMS structure the encoding
|
||||
remains DER.
|
||||
|
||||
If the B<-decrypt> option is used without a recipient certificate then an
|
||||
attempt is made to locate the recipient by trying each potential recipient
|
||||
in turn using the supplied private key. To thwart the MMA attack
|
||||
(Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) all recipients are
|
||||
tried whether they succeed or not and if no recipients match the message
|
||||
is "decrypted" using a random key which will typically output garbage.
|
||||
The B<-debug_decrypt> option can be used to disable the MMA attack protection
|
||||
and return an error if no recipient can be found: this option should be used
|
||||
with caution. For a fuller description see L<CMS_decrypt(3)|CMS_decrypt(3)>).
|
||||
|
||||
=head1 EXIT CODES
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
the operation was completely successfully.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
an error occurred parsing the command options.
|
||||
|
||||
=item 2
|
||||
=item Z<>2
|
||||
|
||||
one of the input files could not be read.
|
||||
|
||||
=item 3
|
||||
=item Z<>3
|
||||
|
||||
an error occurred creating the CMS file or when reading the MIME
|
||||
message.
|
||||
|
||||
=item 4
|
||||
=item Z<>4
|
||||
|
||||
an error occurred decrypting or verifying the message.
|
||||
|
||||
=item 5
|
||||
=item Z<>5
|
||||
|
||||
the message was verified correctly but an error occurred writing out
|
||||
the signers certificates.
|
||||
|
||||
@@ -119,7 +119,7 @@ variable points to a section containing further ENGINE configuration
|
||||
information.
|
||||
|
||||
The section pointed to by B<engines> is a table of engine names (though see
|
||||
B<engine_id> below) and further sections containing configuration informations
|
||||
B<engine_id> below) and further sections containing configuration information
|
||||
specific to each ENGINE.
|
||||
|
||||
Each ENGINE specific section is used to set default algorithms, load
|
||||
|
||||
@@ -62,6 +62,11 @@ don't output the encoded version of the CRL.
|
||||
output a hash of the issuer name. This can be use to lookup CRLs in
|
||||
a directory by issuer name.
|
||||
|
||||
=item B<-hash_old>
|
||||
|
||||
outputs the "hash" of the CRL issuer name using the older algorithm
|
||||
as used by OpenSSL versions before 1.0.0.
|
||||
|
||||
=item B<-issuer>
|
||||
|
||||
output the issuer name.
|
||||
|
||||
@@ -41,7 +41,7 @@ PKCS#8 private key format use the B<pkcs8> command.
|
||||
|
||||
This specifies the input format. The B<DER> option with a private key uses
|
||||
an ASN.1 DER encoded SEC1 private key. When used with a public key it
|
||||
uses the SubjectPublicKeyInfo structur as specified in RFC 3280.
|
||||
uses the SubjectPublicKeyInfo structure as specified in RFC 3280.
|
||||
The B<PEM> form is the default format: it consists of the B<DER> format base64
|
||||
encoded with additional header and footer lines. In the case of a private key
|
||||
PKCS#8 format is also accepted.
|
||||
|
||||
@@ -215,6 +215,10 @@ unsupported options (for example B<openssl enc -help>) includes a
|
||||
list of ciphers, supported by your versesion of OpenSSL, including
|
||||
ones provided by configured engines.
|
||||
|
||||
The B<enc> program does not support authenticated encryption modes
|
||||
like CCM and GCM. The utility does not store or retrieve the
|
||||
authentication tag.
|
||||
|
||||
|
||||
base64 Base 64
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ by default.
|
||||
The filename to write certificates and private keys to, standard output by
|
||||
default. They are all written in PEM format.
|
||||
|
||||
=item B<-pass arg>, B<-passin arg>
|
||||
=item B<-passin arg>
|
||||
|
||||
the PKCS#12 file (i.e. input file) password source. For more information about
|
||||
the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section in
|
||||
@@ -75,10 +75,15 @@ L<openssl(1)|openssl(1)>.
|
||||
|
||||
=item B<-passout arg>
|
||||
|
||||
pass phrase source to encrypt any outputed private keys with. For more
|
||||
pass phrase source to encrypt any outputted private keys with. For more
|
||||
information about the format of B<arg> see the B<PASS PHRASE ARGUMENTS> section
|
||||
in L<openssl(1)|openssl(1)>.
|
||||
|
||||
=item B<-password arg>
|
||||
|
||||
With -export, -password is equivalent to -passout.
|
||||
Otherwise, -password is equivalent to -passin.
|
||||
|
||||
=item B<-noout>
|
||||
|
||||
this option inhibits output of the keys and certificates to the output file
|
||||
|
||||
@@ -303,7 +303,7 @@ Reverses effect of B<-asn1-kludge>
|
||||
|
||||
=item B<-newhdr>
|
||||
|
||||
Adds the word B<NEW> to the PEM file header and footer lines on the outputed
|
||||
Adds the word B<NEW> to the PEM file header and footer lines on the outputted
|
||||
request. Some software (Netscape certificate server) and some CAs need this.
|
||||
|
||||
=item B<-batch>
|
||||
|
||||
@@ -10,6 +10,7 @@ s_client - SSL/TLS client program
|
||||
B<openssl> B<s_client>
|
||||
[B<-connect host:port>]
|
||||
[B<-verify depth>]
|
||||
[B<-verify_return_error>]
|
||||
[B<-cert filename>]
|
||||
[B<-certform DER|PEM>]
|
||||
[B<-key filename>]
|
||||
@@ -90,6 +91,11 @@ Currently the verify operation continues after errors so all the problems
|
||||
with a certificate chain can be seen. As a side effect the connection
|
||||
will never fail due to a server certificate verify failure.
|
||||
|
||||
=item B<-verify_return_error>
|
||||
|
||||
Return verification errors instead of continuing. This will typically
|
||||
abort the handshake with a fatal error.
|
||||
|
||||
=item B<-CApath directory>
|
||||
|
||||
The directory to use for server certificate verification. This directory
|
||||
@@ -286,6 +292,13 @@ Since the SSLv23 client hello cannot include compression methods or extensions
|
||||
these will only be supported if its use is disabled, for example by using the
|
||||
B<-no_sslv2> option.
|
||||
|
||||
The B<s_client> utility is a test tool and is designed to continue the
|
||||
handshake after any certificate verification errors. As a result it will
|
||||
accept any certificate chain (trusted or not) sent by the peer. None test
|
||||
applications should B<not> do this as it makes them vulnerable to a MITM
|
||||
attack. This behaviour can be changed by with the B<-verify_return_error>
|
||||
option: any verify errors are then returned aborting the handshake.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Because this program has a lot of options and also because some of
|
||||
@@ -293,9 +306,6 @@ the techniques used are rather old, the C source of s_client is rather
|
||||
hard to read and not a model of how things should be done. A typical
|
||||
SSL client program would be much simpler.
|
||||
|
||||
The B<-verify> option should really exit if the server verification
|
||||
fails.
|
||||
|
||||
The B<-prexit> option is a bit of a hack. We should really report
|
||||
information whenever a session is renegotiated.
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ B<openssl> B<s_server>
|
||||
[B<-no_ssl3>]
|
||||
[B<-no_tls1>]
|
||||
[B<-no_dhe>]
|
||||
[B<-no_ecdhe>]
|
||||
[B<-bugs>]
|
||||
[B<-hack>]
|
||||
[B<-www>]
|
||||
@@ -111,7 +112,7 @@ by using an appropriate certificate.
|
||||
|
||||
=item B<-dcertform format>, B<-dkeyform format>, B<-dpass arg>
|
||||
|
||||
addtional certificate and private key format and passphrase respectively.
|
||||
additional certificate and private key format and passphrase respectively.
|
||||
|
||||
=item B<-nocert>
|
||||
|
||||
@@ -131,6 +132,11 @@ a static set of parameters hard coded into the s_server program will be used.
|
||||
if this option is set then no DH parameters will be loaded effectively
|
||||
disabling the ephemeral DH cipher suites.
|
||||
|
||||
=item B<-no_ecdhe>
|
||||
|
||||
if this option is set then no ECDH parameters will be loaded effectively
|
||||
disabling the ephemeral ECDH cipher suites.
|
||||
|
||||
=item B<-no_tmp_rsa>
|
||||
|
||||
certain export cipher suites sometimes use a temporary RSA key, this option
|
||||
|
||||
@@ -159,7 +159,7 @@ EVP_get_cipherbyname() function) can also be used preceded by a dash, for
|
||||
example B<-aes_128_cbc>. See L<B<enc>|enc(1)> for list of ciphers
|
||||
supported by your version of OpenSSL.
|
||||
|
||||
If not specified 40 bit RC2 is used. Only used with B<-encrypt>.
|
||||
If not specified triple DES is used. Only used with B<-encrypt>.
|
||||
|
||||
=item B<-nointern>
|
||||
|
||||
@@ -308,28 +308,28 @@ remains DER.
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
the operation was completely successfully.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
an error occurred parsing the command options.
|
||||
|
||||
=item 2
|
||||
=item Z<>2
|
||||
|
||||
one of the input files could not be read.
|
||||
|
||||
=item 3
|
||||
=item Z<>3
|
||||
|
||||
an error occurred creating the PKCS#7 file or when reading the MIME
|
||||
message.
|
||||
|
||||
=item 4
|
||||
=item Z<>4
|
||||
|
||||
an error occurred decrypting or verifying the message.
|
||||
|
||||
=item 5
|
||||
=item Z<>5
|
||||
|
||||
the message was verified correctly but an error occurred writing out
|
||||
the signers certificates.
|
||||
|
||||
@@ -352,7 +352,7 @@ switch always overrides the settings in the config file.
|
||||
|
||||
This is the main section and it specifies the name of another section
|
||||
that contains all the options for the B<-reply> command. This default
|
||||
section can be overriden with the B<-section> command line switch. (Optional)
|
||||
section can be overridden with the B<-section> command line switch. (Optional)
|
||||
|
||||
=item B<oid_file>
|
||||
|
||||
@@ -453,7 +453,7 @@ included. Default is no. (Optional)
|
||||
=head1 ENVIRONMENT VARIABLES
|
||||
|
||||
B<OPENSSL_CONF> contains the path of the configuration file and can be
|
||||
overriden by the B<-config> command line option.
|
||||
overridden by the B<-config> command line option.
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ The name of an EGD socket to get random data from. (Optional)
|
||||
=item [request]...
|
||||
|
||||
List of files containing B<RFC 3161> DER-encoded time stamp requests. If no
|
||||
requests are specifed only one request will be sent to the server and it will be
|
||||
requests are specified only one request will be sent to the server and it will be
|
||||
read from the standard input. (Optional)
|
||||
|
||||
=back
|
||||
|
||||
@@ -25,6 +25,7 @@ B<openssl> B<verify>
|
||||
[B<-untrusted file>]
|
||||
[B<-help>]
|
||||
[B<-issuer_checks>]
|
||||
[B<-attime timestamp>]
|
||||
[B<-verbose>]
|
||||
[B<->]
|
||||
[certificates]
|
||||
@@ -80,6 +81,12 @@ rejected. The presence of rejection messages does not itself imply that
|
||||
anything is wrong; during the normal verification process, several
|
||||
rejections may take place.
|
||||
|
||||
=item B<-attime timestamp>
|
||||
|
||||
Perform validation checks using time specified by B<timestamp> and not
|
||||
current system time. B<timestamp> is the number of seconds since
|
||||
01.01.1970 (UNIX time).
|
||||
|
||||
=item B<-policy arg>
|
||||
|
||||
Enable policy processing and add B<arg> to the user-initial-policy-set (see
|
||||
@@ -386,7 +393,7 @@ an application specific error. Unused.
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
Although the issuer checks are a considerably improvement over the old technique they still
|
||||
Although the issuer checks are a considerable improvement over the old technique they still
|
||||
suffer from limitations in the underlying X509_LOOKUP API. One consequence of this is that
|
||||
trusted certificates with matching subject name must either appear in a file (as specified by the
|
||||
B<-CAfile> option) or a directory (as specified by B<-CApath>. If they occur in both then only
|
||||
|
||||
@@ -13,6 +13,7 @@ B<openssl version>
|
||||
[B<-o>]
|
||||
[B<-f>]
|
||||
[B<-p>]
|
||||
[B<-d>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
@@ -38,7 +39,7 @@ the date the current version of OpenSSL was built.
|
||||
|
||||
option information: various options set when the library was built.
|
||||
|
||||
=item B<-c>
|
||||
=item B<-f>
|
||||
|
||||
compilation flags.
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@ Example:
|
||||
O=Organisation
|
||||
CN=Some Name
|
||||
|
||||
|
||||
|
||||
=head2 Certificate Policies.
|
||||
|
||||
This is a I<raw> extension. All the fields of this extension can be set by
|
||||
@@ -390,7 +390,7 @@ Examples:
|
||||
nameConstraints=permitted;email:.somedomain.com
|
||||
|
||||
nameConstraints=excluded;email:.com
|
||||
issuingDistributionPoint = idp_section
|
||||
|
||||
|
||||
=head2 OCSP No Check
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ necessary parameters are set, by re-creating the blinding parameters.
|
||||
|
||||
BN_BLINDING_convert_ex() multiplies B<n> with the blinding factor B<A>.
|
||||
If B<r> is not NULL a copy the inverse blinding factor B<Ai> will be
|
||||
returned in B<r> (this is useful if a B<RSA> object is shared amoung
|
||||
returned in B<r> (this is useful if a B<RSA> object is shared among
|
||||
several threads). BN_BLINDING_invert_ex() multiplies B<n> with the
|
||||
inverse blinding factor B<Ai>. If B<r> is not NULL it will be used as
|
||||
the inverse blinding.
|
||||
|
||||
@@ -27,7 +27,21 @@ function or errors about unknown algorithms will occur.
|
||||
|
||||
Although the recipients certificate is not needed to decrypt the data it is
|
||||
needed to locate the appropriate (of possible several) recipients in the CMS
|
||||
structure. If B<cert> is set to NULL all possible recipients are tried.
|
||||
structure.
|
||||
|
||||
If B<cert> is set to NULL all possible recipients are tried. This case however
|
||||
is problematic. To thwart the MMA attack (Bleichenbacher's attack on
|
||||
PKCS #1 v1.5 RSA padding) all recipients are tried whether they succeed or
|
||||
not. If no recipient succeeds then a random symmetric key is used to decrypt
|
||||
the content: this will typically output garbage and may (but is not guaranteed
|
||||
to) ultimately return a padding error only. If CMS_decrypt() just returned an
|
||||
error when all recipient encrypted keys failed to decrypt an attacker could
|
||||
use this in a timing attack. If the special flag B<CMS_DEBUG_DECRYPT> is set
|
||||
then the above behaviour is modified and an error B<is> returned if no
|
||||
recipient encrypted key can be decrypted B<without> generating a random
|
||||
content encryption key. Applications should use this flag with
|
||||
B<extreme caution> especially in automated gateways as it can leave them
|
||||
open to attack.
|
||||
|
||||
It is possible to determine the correct recipient key by other means (for
|
||||
example looking them up in a database) and setting them in the CMS structure
|
||||
|
||||
@@ -37,7 +37,7 @@ None of the functions return a value.
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>,
|
||||
L<CONF_modules_load_file(3), CONF_modules_load_file(3)>
|
||||
L<CONF_modules_load_file(3)|CONF_modules_load_file(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ return value of the failing module (this will always be zero or negative).
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<conf(5)|conf(5)>, L<OPENSSL_config(3)|OPENSSL_config(3)>,
|
||||
L<CONF_free(3), CONF_free(3)>, L<err(3),err(3)>
|
||||
L<CONF_free(3)|CONF_free(3)>, L<err(3)|err(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
@@ -52,8 +52,11 @@ ERR_get_error_line_data(), ERR_peek_error_line_data() and
|
||||
ERR_get_last_error_line_data() store additional data and flags
|
||||
associated with the error code in *B<data>
|
||||
and *B<flags>, unless these are B<NULL>. *B<data> contains a string
|
||||
if *B<flags>&B<ERR_TXT_STRING>. If it has been allocated by OPENSSL_malloc(),
|
||||
*B<flags>&B<ERR_TXT_MALLOCED> is true.
|
||||
if *B<flags>&B<ERR_TXT_STRING> is true.
|
||||
|
||||
An application B<MUST NOT> free the *B<data> pointer (or any other pointers
|
||||
returned by these functions) with OPENSSL_free() as freeing is handled
|
||||
automatically by the error library.
|
||||
|
||||
=head1 RETURN VALUES
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ EVP_BytesToKey - password based encryption routine
|
||||
|
||||
EVP_BytesToKey() derives a key and IV from various parameters. B<type> is
|
||||
the cipher to derive the key and IV for. B<md> is the message digest to use.
|
||||
The B<salt> paramter is used as a salt in the derivation: it should point to
|
||||
The B<salt> parameter is used as a salt in the derivation: it should point to
|
||||
an 8 byte buffer or NULL if no salt is used. B<data> is a buffer containing
|
||||
B<datal> bytes which is used to derive the keying data. B<count> is the
|
||||
iteration count to use. The derived key and IV will be written to B<key>
|
||||
|
||||
@@ -152,7 +152,7 @@ does not remain in memory.
|
||||
|
||||
EVP_EncryptInit(), EVP_DecryptInit() and EVP_CipherInit() behave in a
|
||||
similar way to EVP_EncryptInit_ex(), EVP_DecryptInit_ex and
|
||||
EVP_CipherInit_ex() except the B<ctx> paramter does not need to be
|
||||
EVP_CipherInit_ex() except the B<ctx> parameter does not need to be
|
||||
initialized and they always use the default cipher implementation.
|
||||
|
||||
EVP_EncryptFinal(), EVP_DecryptFinal() and EVP_CipherFinal() behave in a
|
||||
|
||||
@@ -73,7 +73,7 @@ Neither OPENSSL_config() nor OPENSSL_no_config() return a value.
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<conf(5)|conf(5)>, L<CONF_load_modules_file(3)|CONF_load_modules_file(3)>,
|
||||
L<CONF_modules_free(3),CONF_modules_free(3)>
|
||||
L<CONF_modules_free(3)|CONF_modules_free(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ set first so the relevant field information can be looked up internally.
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509_NAME(3)|d2i_X509_NAME(3)>,
|
||||
L<OBJ_nid2obj(3),OBJ_nid2obj(3)>
|
||||
L<OBJ_nid2obj(3)|OBJ_nid2obj(3)>
|
||||
|
||||
=head1 HISTORY
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ X509_STORE_CTX_get_ex_new_index, X509_STORE_CTX_set_ex_data, X509_STORE_CTX_get_
|
||||
|
||||
int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *d, int idx, void *arg);
|
||||
|
||||
char *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *d, int idx);
|
||||
void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *d, int idx);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ a special status code is set to the verification callback. This permits it
|
||||
to examine the valid policy tree and perform additional checks or simply
|
||||
log it for debugging purposes.
|
||||
|
||||
By default some addtional features such as indirect CRLs and CRLs signed by
|
||||
By default some additional features such as indirect CRLs and CRLs signed by
|
||||
different keys are disabled. If B<X509_V_FLAG_EXTENDED_CRL_SUPPORT> is set
|
||||
they are enabled.
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ handle PKCS#8 format encrypted and unencrypted keys too.
|
||||
PEM_write_bio_PKCS8PrivateKey() and PEM_write_PKCS8PrivateKey()
|
||||
write a private key in an EVP_PKEY structure in PKCS#8
|
||||
EncryptedPrivateKeyInfo format using PKCS#5 v2.0 password based encryption
|
||||
algorithms. The B<cipher> argument specifies the encryption algoritm to
|
||||
algorithms. The B<cipher> argument specifies the encryption algorithm to
|
||||
use: unlike all other PEM routines the encryption is applied at the
|
||||
PKCS#8 level and not in the PEM headers. If B<cipher> is NULL then no
|
||||
encryption is used and a PKCS#8 PrivateKeyInfo structure is used instead.
|
||||
|
||||
@@ -21,6 +21,13 @@ pub 2048R/F295C759 1998-12-13
|
||||
Key fingerprint = D0 5D 8C 61 6E 27 E6 60 41 EC B1 B8 D5 7E E5 97
|
||||
uid Dr S N Henson <shenson@drh-consultancy.demon.co.uk>
|
||||
|
||||
pub 4096R/FA40E9E2 2005-03-19
|
||||
Key fingerprint = 6260 5AA4 334A F9F0 DDE5 D349 D357 7507 FA40 E9E2
|
||||
uid Dr Stephen Henson <shenson@opensslfoundation.com>
|
||||
uid Dr Stephen Henson <shenson@drh-consultancy.co.uk>
|
||||
uid Dr Stephen N Henson <steve@openssl.org>
|
||||
sub 4096R/8811F530 2005-03-19
|
||||
|
||||
pub 1024R/49A563D9 1997-02-24
|
||||
Key fingerprint = 7B 79 19 FA 71 6B 87 25 0E 77 21 E5 52 D9 83 BF
|
||||
uid Mark Cox <mjc@redhat.com>
|
||||
|
||||
@@ -53,11 +53,11 @@ SSL_COMP_add_compression_method() may return the following values:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The operation failed. Check the error queue to find out the reason.
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ The following values are returned by all functions:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The operation failed. In case of the add operation, it was tried to add
|
||||
the same (identical) session twice. In case of the remove operation, the
|
||||
session was not found in the cache.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
|
||||
@@ -100,13 +100,13 @@ The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The operation failed because B<CAfile> and B<CApath> are NULL or the
|
||||
processing at one of the locations specified failed. Check the error
|
||||
stack to find out the reason.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@ values:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
A failure while manipulating the STACK_OF(X509_NAME) object occurred or
|
||||
the X509_NAME could not be extracted from B<cacert>. Check the error stack
|
||||
to find out the reason.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ SSL_CTX_set_msg_callback, SSL_CTX_set_msg_callback_arg, SSL_set_msg_callback, SS
|
||||
void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
|
||||
void SSL_CTX_set_msg_callback_arg(SSL_CTX *ctx, void *arg);
|
||||
|
||||
void SSL_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
|
||||
void SSL_set_msg_callback_arg(SSL_CTX *ctx, void *arg);
|
||||
void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
|
||||
void SSL_set_msg_callback_arg(SSL *ssl, void *arg);
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
|
||||
@@ -112,6 +112,12 @@ vulnerability affecting CBC ciphers, which cannot be handled by some
|
||||
broken SSL implementations. This option has no effect for connections
|
||||
using other ciphers.
|
||||
|
||||
=item SSL_OP_TLSEXT_PADDING
|
||||
|
||||
Adds a padding extension to ensure the ClientHello size is never between
|
||||
256 and 511 bytes in length. This is needed as a workaround for some
|
||||
implementations.
|
||||
|
||||
=item SSL_OP_ALL
|
||||
|
||||
All of the above bug workarounds.
|
||||
|
||||
@@ -64,13 +64,13 @@ return the following values:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The length B<sid_ctx_len> of the session id context B<sid_ctx> exceeded
|
||||
the maximum allowed length of B<SSL_MAX_SSL_SESSION_ID_LENGTH>. The error
|
||||
is logged to the error stack.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
|
||||
@@ -42,11 +42,11 @@ and SSL_set_ssl_method():
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The new choice failed, check the error stack to find out the reason.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The operation succeeded.
|
||||
|
||||
|
||||
@@ -169,8 +169,8 @@ that will always continue the TLS/SSL handshake regardless of verification
|
||||
failure, if wished. The callback realizes a verification depth limit with
|
||||
more informational output.
|
||||
|
||||
All verification errors are printed, informations about the certificate chain
|
||||
are printed on request.
|
||||
All verification errors are printed; information about the certificate chain
|
||||
is printed on request.
|
||||
The example is realized for a server that does allow but not require client
|
||||
certificates.
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ data to B<psk> and return the length of the random data, so the
|
||||
connection will fail with decryption_error before it will be finished
|
||||
completely.
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
PSK identity was not found. An "unknown_psk_identity" alert message
|
||||
will be sent and the connection setup fails.
|
||||
|
||||
@@ -44,13 +44,13 @@ The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The TLS/SSL handshake was not successful but was shut down controlled and
|
||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
|
||||
established.
|
||||
|
||||
@@ -56,12 +56,12 @@ The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The SSL_clear() operation could not be performed. Check the error stack to
|
||||
find out the reason.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The SSL_clear() operation was successful.
|
||||
|
||||
|
||||
@@ -41,13 +41,13 @@ The following return values can occur:
|
||||
|
||||
=over 4
|
||||
|
||||
=item 0
|
||||
=item Z<>0
|
||||
|
||||
The TLS/SSL handshake was not successful but was shut down controlled and
|
||||
by the specifications of the TLS/SSL protocol. Call SSL_get_error() with the
|
||||
return value B<ret> to find out the reason.
|
||||
|
||||
=item 1
|
||||
=item Z<>1
|
||||
|
||||
The TLS/SSL handshake was successfully completed, a TLS/SSL connection has been
|
||||
established.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user