summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/a_d2i_fp.c3
-rw-r--r--crypto/asn1/a_dup.c2
-rw-r--r--crypto/asn1/a_i2d_fp.c2
-rw-r--r--crypto/asn1/a_object.c3
-rw-r--r--crypto/asn1/a_strex.c14
-rw-r--r--crypto/asn1/f_int.c7
-rw-r--r--crypto/asn1/f_string.c4
-rw-r--r--crypto/asn1/p5_pbev2.c7
-rw-r--r--crypto/asn1/standard_methods.h1
-rw-r--r--crypto/asn1/tasn_fre.c6
-rw-r--r--crypto/bio/bf_readbuff.c5
-rw-r--r--crypto/bio/bio_addr.c17
-rw-r--r--crypto/bn/asm/mips.pl2
-rw-r--r--crypto/bn/bn_conv.c5
-rw-r--r--crypto/bn/bn_lib.c5
-rw-r--r--crypto/bn/bn_mod.c3
-rw-r--r--crypto/bn/bn_nist.c4
-rw-r--r--crypto/build.info4
-rw-r--r--crypto/cmac/cmac.c27
-rw-r--r--crypto/cmp/cmp_msg.c30
-rw-r--r--crypto/cmp/cmp_server.c3
-rw-r--r--crypto/cms/cms_dh.c2
-rw-r--r--crypto/cms/cms_env.c2
-rw-r--r--crypto/cms/cms_lib.c25
-rw-r--r--crypto/cms/cms_sd.c2
-rw-r--r--crypto/cms/cms_smime.c21
-rw-r--r--crypto/conf/conf_def.c2
-rw-r--r--crypto/conf/conf_mod.c12
-rw-r--r--crypto/context.c11
-rw-r--r--crypto/core_namemap.c266
-rw-r--r--crypto/cpt_err.c3
-rw-r--r--crypto/cversion.c21
-rw-r--r--crypto/defaults.c200
-rw-r--r--crypto/des/set_key.c5
-rw-r--r--crypto/dsa/dsa_ameth.c14
-rw-r--r--crypto/ec/curve25519.c15
-rw-r--r--crypto/ec/curve448/curve448.c5
-rw-r--r--crypto/ec/curve448/eddsa.c22
-rw-r--r--crypto/ec/ec_backend.c3
-rw-r--r--crypto/ec/ec_key.c6
-rw-r--r--crypto/ec/ec_print.c24
-rw-r--r--crypto/ec/ecp_nistp256.c10
-rw-r--r--crypto/ec/ecp_nistp384.c6
-rw-r--r--crypto/engine/eng_list.c4
-rw-r--r--crypto/err/openssl.txt18
-rw-r--r--crypto/evp/bio_b64.c126
-rw-r--r--crypto/evp/bio_ok.c8
-rw-r--r--crypto/evp/dh_support.c5
-rw-r--r--crypto/evp/digest.c78
-rw-r--r--crypto/evp/e_des3.c5
-rw-r--r--crypto/evp/encode.c2
-rw-r--r--crypto/evp/evp_err.c148
-rw-r--r--crypto/evp/evp_lib.c331
-rw-r--r--crypto/evp/evp_local.h11
-rw-r--r--crypto/evp/keymgmt_meth.c33
-rw-r--r--crypto/evp/m_sigver.c72
-rw-r--r--crypto/evp/names.c34
-rw-r--r--crypto/evp/p5_crpt.c2
-rw-r--r--crypto/evp/p_lib.c3
-rw-r--r--crypto/evp/pmeth_lib.c13
-rw-r--r--crypto/evp/signature.c633
-rw-r--r--crypto/ffc/ffc_params_generate.c3
-rw-r--r--crypto/hashtable/build.info6
-rw-r--r--crypto/hashtable/hashtable.c188
-rw-r--r--crypto/hmac/build.info21
-rw-r--r--crypto/hmac/hmac.c33
-rw-r--r--crypto/hmac/hmac_local.h45
-rw-r--r--crypto/hmac/hmac_s390x.c299
-rw-r--r--crypto/hpke/hpke.c3
-rw-r--r--crypto/idea/idea_local.h9
-rw-r--r--crypto/indicator_core.c55
-rw-r--r--crypto/info.c19
-rw-r--r--crypto/mem_sec.c6
-rw-r--r--crypto/o_fopen.c8
-rw-r--r--crypto/o_str.c86
-rw-r--r--crypto/objects/obj_dat.c20
-rw-r--r--crypto/objects/obj_dat.h34
-rw-r--r--crypto/objects/obj_mac.num5
-rw-r--r--crypto/objects/objects.txt7
-rw-r--r--crypto/ocsp/ocsp_vfy.c2
-rw-r--r--crypto/pem/pem_pkey.c2
-rw-r--r--crypto/pkcs12/p12_crt.c2
-rw-r--r--crypto/pkcs12/p12_key.c2
-rw-r--r--crypto/pkcs12/p12_mutl.c296
-rw-r--r--crypto/pkcs7/pk7_attr.c4
-rw-r--r--crypto/pkcs7/pk7_doit.c47
-rw-r--r--crypto/pkcs7/pk7_lib.c4
-rw-r--r--crypto/pkcs7/pk7_local.h1
-rw-r--r--crypto/pkcs7/pk7_smime.c42
-rw-r--r--crypto/property/property.c53
-rw-r--r--crypto/provider_core.c11
-rw-r--r--crypto/rand/rand_lib.c6
-rw-r--r--crypto/rand/randfile.c11
-rw-r--r--crypto/rsa/rsa_backend.c6
-rw-r--r--crypto/rsa/rsa_gen.c60
-rw-r--r--crypto/rsa/rsa_lib.c50
-rw-r--r--crypto/rsa/rsa_oaep.c12
-rw-r--r--crypto/rsa/rsa_ossl.c1
-rw-r--r--crypto/rsa/rsa_pss.c31
-rw-r--r--crypto/rsa/rsa_schemes.c2
-rw-r--r--crypto/rsa/rsa_sign.c16
-rw-r--r--crypto/rsa/rsa_x931.c33
-rw-r--r--crypto/s390x_arch.h17
-rwxr-xr-xcrypto/s390xcpuid.pl4
-rw-r--r--crypto/self_test_core.c6
-rw-r--r--crypto/sha/keccak1600.c12
-rw-r--r--crypto/sha/sha256.c26
-rw-r--r--crypto/sha/sha3.c8
-rw-r--r--crypto/sm2/sm2_crypt.c2
-rw-r--r--crypto/sm2/sm2_sign.c2
-rw-r--r--crypto/sm3/sm3_local.h2
-rw-r--r--crypto/sm4/sm4.c5
-rw-r--r--crypto/store/store_strings.c4
-rw-r--r--crypto/threads_pthread.c43
-rw-r--r--crypto/threads_win.c90
-rw-r--r--crypto/ts/ts_rsp_verify.c2
-rw-r--r--crypto/ts/ts_verify_ctx.c40
-rw-r--r--crypto/x509/build.info2
-rw-r--r--crypto/x509/ext_dat.h3
-rw-r--r--crypto/x509/pcy_tree.c2
-rw-r--r--crypto/x509/standard_exts.h3
-rw-r--r--crypto/x509/v3_audit_id.c20
-rw-r--r--crypto/x509/v3_battcons.c86
-rw-r--r--crypto/x509/v3_iobo.c32
-rw-r--r--crypto/x509/v3_pci.c4
-rw-r--r--crypto/x509/v3_san.c20
-rw-r--r--crypto/x509/x509_att.c11
-rw-r--r--crypto/x509/x509_def.c73
-rw-r--r--crypto/x509/x509_obj.c7
-rw-r--r--crypto/x509/x509_req.c71
-rw-r--r--crypto/x509/x509_v3.c30
-rw-r--r--crypto/x509/x_attrib.c98
-rw-r--r--crypto/x509/x_name.c4
-rw-r--r--crypto/x509/x_pubkey.c2
134 files changed, 3582 insertions, 1047 deletions
diff --git a/crypto/asn1/a_d2i_fp.c b/crypto/asn1/a_d2i_fp.c
index 4af2276a8d..f36c769b18 100644
--- a/crypto/asn1/a_d2i_fp.c
+++ b/crypto/asn1/a_d2i_fp.c
@@ -148,6 +148,9 @@ int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
goto err;
}
len += i;
+ if ((size_t)i < want)
+ continue;
+
}
}
/* else data already loaded */
diff --git a/crypto/asn1/a_dup.c b/crypto/asn1/a_dup.c
index 23d1d63808..33dc3ff58e 100644
--- a/crypto/asn1/a_dup.c
+++ b/crypto/asn1/a_dup.c
@@ -75,7 +75,7 @@ void *ASN1_item_dup(const ASN1_ITEM *it, const void *x)
}
i = ASN1_item_i2d(x, &b, it);
- if (b == NULL) {
+ if (i < 0 || b == NULL) {
ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
return NULL;
}
diff --git a/crypto/asn1/a_i2d_fp.c b/crypto/asn1/a_i2d_fp.c
index e30f1f2a17..ccee6fccb0 100644
--- a/crypto/asn1/a_i2d_fp.c
+++ b/crypto/asn1/a_i2d_fp.c
@@ -88,7 +88,7 @@ int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x)
int i, j = 0, n, ret = 1;
n = ASN1_item_i2d(x, &b, it);
- if (b == NULL) {
+ if (n < 0 || b == NULL) {
ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
return 0;
}
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c
index 73c69eacd2..2279379793 100644
--- a/crypto/asn1/a_object.c
+++ b/crypto/asn1/a_object.c
@@ -198,7 +198,8 @@ int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a)
}
if (i <= 0) {
i = BIO_write(bp, "<INVALID>", 9);
- i += BIO_dump(bp, (const char *)a->data, a->length);
+ if (i > 0)
+ i += BIO_dump(bp, (const char *)a->data, a->length);
return i;
}
BIO_write(bp, p, i);
diff --git a/crypto/asn1/a_strex.c b/crypto/asn1/a_strex.c
index 29ea60596e..87365af32d 100644
--- a/crypto/asn1/a_strex.c
+++ b/crypto/asn1/a_strex.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <string.h>
#include "internal/cryptlib.h"
+#include "internal/sizes.h"
#include "crypto/asn1.h"
#include <openssl/crypto.h>
#include <openssl/x509.h>
@@ -234,15 +235,14 @@ static int do_buf(unsigned char *buf, int buflen,
static int do_hex_dump(char_io *io_ch, void *arg, unsigned char *buf,
int buflen)
{
- static const char hexdig[] = "0123456789ABCDEF";
unsigned char *p, *q;
char hextmp[2];
+
if (arg) {
p = buf;
q = buf + buflen;
while (p != q) {
- hextmp[0] = hexdig[*p >> 4];
- hextmp[1] = hexdig[*p & 0xf];
+ ossl_to_hex(hextmp, *p);
if (!io_ch(arg, hextmp, 2))
return -1;