summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/dh/dh_meth.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2017-08-31 13:57:30 -0400
committerPeter Jones <pjones@redhat.com>2017-08-31 15:13:58 -0400
commit1d39ada8cb336d9e7c156be7526b674851fbdd40 (patch)
treedc497e33b1d4830bf58d79dedc3026087f31f044 /Cryptlib/OpenSSL/crypto/dh/dh_meth.c
parenteae64276ffe0361d2b4087c48390d12f157f65f0 (diff)
downloadefi-boot-shim-1d39ada8cb336d9e7c156be7526b674851fbdd40.tar.gz
efi-boot-shim-1d39ada8cb336d9e7c156be7526b674851fbdd40.zip
Revert lots of Cryptlib updates.
OpenSSL changes quite a bit of the key validation, and most of the keys I can find in the wild aren't marked as trusted by the new checker. Intel noticed this too: https://github.com/vathpela/edk2/commit/f536d7c3ed but instead of fixing the compatibility error, they switched their test data to match the bug. So that's pretty broken. For now, I'm reverting OpenSSL 1.1.0e, because we need those certs in the wild to work. This reverts commit 513cbe2aea689bf968f171f894f3d4cdb43524d5. This reverts commit e9cc33d6f2b7f35c6f5e349fd83fb9ae0bc66226. This reverts commit 80d49f758ead0180bfe6161931838e0578248303. This reverts commit 9bc647e2b23bcfd69a0077c0717fbc454c919a57. This reverts commit ae75df6232ad30f3e8736e9449692d58a7439260. This reverts commit e883479f35644d17db7efed710657c8543cfcb68. This reverts commit 97469449fda5ba933a64280917e776487301a127. This reverts commit e39692647f78e13d757ddbfdd36f440d5f526050. This reverts commit 0f3dfc01e2d5e7df882c963dd8dc4a0dfbfc96ad. This reverts commit 4da6ac819510c7cc4ba21d7a735d69b45daa5873. This reverts commit d064bd7eef201f26cb926450a76260b5187ac689. This reverts commit 9bc86cfd6f9387f0da9d5c0102b6aa5627e91c91. This reverts commit ab9a05a10f16b33f7ee1e9da360c7801eebdb9d2. Signed-off-by: Peter Jones <pjones@redhat.com>
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/dh/dh_meth.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/dh/dh_meth.c173
1 files changed, 0 insertions, 173 deletions
diff --git a/Cryptlib/OpenSSL/crypto/dh/dh_meth.c b/Cryptlib/OpenSSL/crypto/dh/dh_meth.c
deleted file mode 100644
index ce6114c1..00000000
--- a/Cryptlib/OpenSSL/crypto/dh/dh_meth.c
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2016 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
- * in the file LICENSE in the source distribution or at
- * https://www.openssl.org/source/license.html
- */
-
-#include "dh_locl.h"
-#include <string.h>
-#include <openssl/err.h>
-
-DH_METHOD *DH_meth_new(const char *name, int flags)
-{
- DH_METHOD *dhm = OPENSSL_zalloc(sizeof(*dhm));
-
- if (dhm != NULL) {
- dhm->flags = flags;
-
- dhm->name = OPENSSL_strdup(name);
- if (dhm->name != NULL)
- return dhm;
-
- OPENSSL_free(dhm);
- }
-
- DHerr(DH_F_DH_METH_NEW, ERR_R_MALLOC_FAILURE);
- return NULL;
-}
-
-void DH_meth_free(DH_METHOD *dhm)
-{
- if (dhm != NULL) {
- OPENSSL_free(dhm->name);
- OPENSSL_free(dhm);
- }
-}
-
-DH_METHOD *DH_meth_dup(const DH_METHOD *dhm)
-{
- DH_METHOD *ret = OPENSSL_malloc(sizeof(*ret));
-
- if (ret != NULL) {
- memcpy(ret, dhm, sizeof(*dhm));
-
- ret->name = OPENSSL_strdup(dhm->name);
- if (ret->name != NULL)
- return ret;
-
- OPENSSL_free(ret);
- }
-
- DHerr(DH_F_DH_METH_DUP, ERR_R_MALLOC_FAILURE);
- return NULL;
-}
-
-const char *DH_meth_get0_name(const DH_METHOD *dhm)
-{
- return dhm->name;
-}
-
-int DH_meth_set1_name(DH_METHOD *dhm, const char *name)
-{
- char *tmpname = OPENSSL_strdup(name);
-
- if (tmpname == NULL) {
- DHerr(DH_F_DH_METH_SET1_NAME, ERR_R_MALLOC_FAILURE);
- return 0;
- }
-
- OPENSSL_free(dhm->name);
- dhm->name = tmpname;
-
- return 1;
-}
-
-int DH_meth_get_flags(DH_METHOD *dhm)
-{
- return dhm->flags;
-}
-
-int DH_meth_set_flags(DH_METHOD *dhm, int flags)
-{
- dhm->flags = flags;
- return 1;
-}
-
-void *DH_meth_get0_app_data(const DH_METHOD *dhm)
-{
- return dhm->app_data;
-}
-
-int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data)
-{
- dhm->app_data = app_data;
- return 1;
-}
-
-int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *)
-{
- return dhm->generate_key;
-}
-
-int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key) (DH *))
-{
- dhm->generate_key = generate_key;
- return 1;
-}
-
-int (*DH_meth_get_compute_key(const DH_METHOD *dhm))
- (unsigned char *key, const BIGNUM *pub_key, DH *dh)
-{
- return dhm->compute_key;
-}
-
-int DH_meth_set_compute_key(DH_METHOD *dhm,
- int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh))
-{
- dhm->compute_key = compute_key;
- return 1;
-}
-
-
-int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm))
- (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
- BN_CTX *, BN_MONT_CTX *)
-{
- return dhm->bn_mod_exp;
-}
-
-int DH_meth_set_bn_mod_exp(DH_METHOD *dhm,
- int (*bn_mod_exp) (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *,
- const BIGNUM *, BN_CTX *, BN_MONT_CTX *))
-{
- dhm->bn_mod_exp = bn_mod_exp;
- return 1;
-}
-
-int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *)
-{
- return dhm->init;
-}
-
-int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *))
-{
- dhm->init = init;
- return 1;
-}
-
-int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *)
-{
- return dhm->finish;
-}
-
-int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *))
-{
- dhm->finish = finish;
- return 1;
-}
-
-int (*DH_meth_get_generate_params(const DH_METHOD *dhm))
- (DH *, int, int, BN_GENCB *)
-{
- return dhm->generate_params;
-}
-
-int DH_meth_set_generate_params(DH_METHOD *dhm,
- int (*generate_params) (DH *, int, int, BN_GENCB *))
-{
- dhm->generate_params = generate_params;
- return 1;
-}