summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2015-02-11 03:55:43 +0000
committerBob Beck <beck@cvs.openbsd.org>2015-02-11 03:55:43 +0000
commitec9cc08b88cd09654db5561b93a3ffbe8213d114 (patch)
treed06fd06c86f6505aa3a9eb779a73c48da56a0da3 /lib
parent8755e70d3f9e62b11fb8d595d874aece83bcb3d4 (diff)
get rid of OPENSSL_NO_CMS code we do not use.
ok miod@
Diffstat (limited to 'lib')
-rw-r--r--lib/libssl/src/crypto/cms/cms.h4
-rw-r--r--lib/libssl/src/crypto/dsa/dsa_ameth.c25
-rw-r--r--lib/libssl/src/crypto/ec/ec_ameth.c23
-rw-r--r--lib/libssl/src/crypto/err/err_all.c8
-rw-r--r--lib/libssl/src/crypto/gost/gostr341001_ameth.c16
-rw-r--r--lib/libssl/src/crypto/gost/gostr341001_pmeth.c7
-rw-r--r--lib/libssl/src/crypto/pem/pem_lib.c11
-rw-r--r--lib/libssl/src/crypto/rsa/rsa_ameth.c16
-rw-r--r--lib/libssl/src/crypto/rsa/rsa_pmeth.c25
9 files changed, 12 insertions, 123 deletions
diff --git a/lib/libssl/src/crypto/cms/cms.h b/lib/libssl/src/crypto/cms/cms.h
index 0e4aa6f9fce..f08e2f84574 100644
--- a/lib/libssl/src/crypto/cms/cms.h
+++ b/lib/libssl/src/crypto/cms/cms.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cms.h,v 1.5 2014/07/10 22:45:56 jsing Exp $ */
+/* $OpenBSD: cms.h,v 1.6 2015/02/11 03:55:42 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project.
*/
@@ -58,9 +58,7 @@
#include <openssl/x509.h>
-#ifdef OPENSSL_NO_CMS
#error CMS is disabled.
-#endif
#ifdef __cplusplus
extern "C" {
diff --git a/lib/libssl/src/crypto/dsa/dsa_ameth.c b/lib/libssl/src/crypto/dsa/dsa_ameth.c
index 20839b6207e..8f7a73a4813 100644
--- a/lib/libssl/src/crypto/dsa/dsa_ameth.c
+++ b/lib/libssl/src/crypto/dsa/dsa_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsa_ameth.c,v 1.14 2014/07/13 12:45:01 miod Exp $ */
+/* $OpenBSD: dsa_ameth.c,v 1.15 2015/02/11 03:55:42 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -66,9 +66,6 @@
#include <openssl/err.h>
#include <openssl/x509.h>
-#ifndef OPENSSL_NO_CMS
-#include <openssl/cms.h>
-#endif
#include "asn1_locl.h"
@@ -595,26 +592,6 @@ dsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
0);
}
return 1;
-#ifndef OPENSSL_NO_CMS
- case ASN1_PKEY_CTRL_CMS_SIGN:
- if (arg1 == 0) {
- int snid, hnid;
- X509_ALGOR *alg1, *alg2;
-
- CMS_SignerInfo_get0_algs(arg2, NULL, NULL, &alg1, &alg2);
- if (alg1 == NULL || alg1->algorithm == NULL)
- return -1;
- hnid = OBJ_obj2nid(alg1->algorithm);
- if (hnid == NID_undef)
- return -1;
- if (!OBJ_find_sigid_by_algs(&snid, hnid,
- EVP_PKEY_id(pkey)))
- return -1;
- X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF,
- 0);
- }
- return 1;
-#endif
case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
*(int *)arg2 = NID_sha1;
diff --git a/lib/libssl/src/crypto/ec/ec_ameth.c b/lib/libssl/src/crypto/ec/ec_ameth.c
index b4ae1c06237..567d16e307f 100644
--- a/lib/libssl/src/crypto/ec/ec_ameth.c
+++ b/lib/libssl/src/crypto/ec/ec_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_ameth.c,v 1.14 2014/10/07 04:58:50 miod Exp $ */
+/* $OpenBSD: ec_ameth.c,v 1.15 2015/02/11 03:55:42 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -65,9 +65,6 @@
#include <openssl/err.h>
#include <openssl/x509.h>
-#ifndef OPENSSL_NO_CMS
-#include <openssl/cms.h>
-#endif
#include "asn1_locl.h"
@@ -573,24 +570,6 @@ ec_pkey_ctrl(EVP_PKEY * pkey, int op, long arg1, void *arg2)
X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0);
}
return 1;
-#ifndef OPENSSL_NO_CMS
- case ASN1_PKEY_CTRL_CMS_SIGN:
- if (arg1 == 0) {
- int snid, hnid;
- X509_ALGOR *alg1, *alg2;
- CMS_SignerInfo_get0_algs(arg2, NULL, NULL,
- &alg1, &alg2);
- if (alg1 == NULL || alg1->algorithm == NULL)
- return -1;
- hnid = OBJ_obj2nid(alg1->algorithm);
- if (hnid == NID_undef)
- return -1;
- if (!OBJ_find_sigid_by_algs(&snid, hnid, EVP_PKEY_id(pkey)))
- return -1;
- X509_ALGOR_set0(alg2, OBJ_nid2obj(snid), V_ASN1_UNDEF, 0);
- }
- return 1;
-#endif
case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
*(int *) arg2 = NID_sha1;
diff --git a/lib/libssl/src/crypto/err/err_all.c b/lib/libssl/src/crypto/err/err_all.c
index e809d79496e..296c1a5ba3a 100644
--- a/lib/libssl/src/crypto/err/err_all.c
+++ b/lib/libssl/src/crypto/err/err_all.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: err_all.c,v 1.20 2015/02/11 03:55:00 beck Exp $ */
+/* $OpenBSD: err_all.c,v 1.21 2015/02/11 03:55:42 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -115,6 +115,9 @@ ERR_load_crypto_strings(void)
#ifndef OPENSSL_NO_RSA
ERR_load_RSA_strings();
#endif
+#ifndef OPENSSL_NO_COMP
+#include <openssl/comp.h>
+#endif
#ifndef OPENSSL_NO_DH
ERR_load_DH_strings();
#endif
@@ -151,9 +154,6 @@ ERR_load_crypto_strings(void)
#endif
ERR_load_OCSP_strings();
ERR_load_UI_strings();
-#ifndef OPENSSL_NO_CMS
- ERR_load_CMS_strings();
-#endif
#ifndef OPENSSL_NO_GOST
ERR_load_GOST_strings();
#endif
diff --git a/lib/libssl/src/crypto/gost/gostr341001_ameth.c b/lib/libssl/src/crypto/gost/gostr341001_ameth.c
index fea6ef26dd1..fb1d57ad6d8 100644
--- a/lib/libssl/src/crypto/gost/gostr341001_ameth.c
+++ b/lib/libssl/src/crypto/gost/gostr341001_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gostr341001_ameth.c,v 1.6 2015/02/11 03:19:37 doug Exp $ */
+/* $OpenBSD: gostr341001_ameth.c,v 1.7 2015/02/11 03:55:42 beck Exp $ */
/*
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* Copyright (c) 2005-2006 Cryptocom LTD
@@ -61,9 +61,6 @@
#include <openssl/x509.h>
#include <openssl/gost.h>
-#ifndef OPENSSL_NO_CMS
-#include <openssl/cms.h>
-#endif
#include "asn1_locl.h"
#include "gost_locl.h"
@@ -656,17 +653,6 @@ pkey_ctrl_gost01(EVP_PKEY *pkey, int op, long arg1, void *arg2)
if (arg1 == 0)
PKCS7_RECIP_INFO_get0_alg(arg2, &alg3);
break;
-#ifndef OPENSSL_NO_CMS
- case ASN1_PKEY_CTRL_CMS_SIGN:
- if (arg1 == 0)
- CMS_SignerInfo_get0_algs(arg2, NULL, NULL, &alg1, &alg2);
- break;
-
- case ASN1_PKEY_CTRL_CMS_ENVELOPE:
- if (arg1 == 0)
- CMS_RecipientInfo_ktri_get0_algs(arg2, NULL, NULL, &alg3);
- break;
-#endif
case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
*(int *)arg2 = GostR3410_get_md_digest(digest);
return 2;
diff --git a/lib/libssl/src/crypto/gost/gostr341001_pmeth.c b/lib/libssl/src/crypto/gost/gostr341001_pmeth.c
index 8a71f814b20..89e1ae62cdc 100644
--- a/lib/libssl/src/crypto/gost/gostr341001_pmeth.c
+++ b/lib/libssl/src/crypto/gost/gostr341001_pmeth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gostr341001_pmeth.c,v 1.8 2015/02/11 03:19:37 doug Exp $ */
+/* $OpenBSD: gostr341001_pmeth.c,v 1.9 2015/02/11 03:55:42 beck Exp $ */
/*
* Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* Copyright (c) 2005-2006 Cryptocom LTD
@@ -597,11 +597,6 @@ pkey_gost01_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
case EVP_PKEY_CTRL_PKCS7_DECRYPT:
case EVP_PKEY_CTRL_PKCS7_SIGN:
case EVP_PKEY_CTRL_DIGESTINIT:
-#ifndef OPENSSL_NO_CMS
- case EVP_PKEY_CTRL_CMS_ENCRYPT:
- case EVP_PKEY_CTRL_CMS_DECRYPT:
- case EVP_PKEY_CTRL_CMS_SIGN:
-#endif
return 1;
case EVP_PKEY_CTRL_GOST_PARAMSET:
diff --git a/lib/libssl/src/crypto/pem/pem_lib.c b/lib/libssl/src/crypto/pem/pem_lib.c
index 011e9e36de5..9107e9c225a 100644
--- a/lib/libssl/src/crypto/pem/pem_lib.c
+++ b/lib/libssl/src/crypto/pem/pem_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pem_lib.c,v 1.37 2015/02/11 03:19:37 doug Exp $ */
+/* $OpenBSD: pem_lib.c,v 1.38 2015/02/11 03:55:42 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -264,15 +264,6 @@ check_pem(const char *nm, const char *name)
!strcmp(name, PEM_STRING_PKCS7))
return 1;
-#ifndef OPENSSL_NO_CMS
- if (!strcmp(nm, PEM_STRING_X509) &&
- !strcmp(name, PEM_STRING_CMS))
- return 1;
- /* Allow CMS to be read from PKCS#7 headers */
- if (!strcmp(nm, PEM_STRING_PKCS7) &&
- !strcmp(name, PEM_STRING_CMS))
- return 1;
-#endif
return 0;
}
diff --git a/lib/libssl/src/crypto/rsa/rsa_ameth.c b/lib/libssl/src/crypto/rsa/rsa_ameth.c
index f842a7c70cc..a68fcbeb11b 100644
--- a/lib/libssl/src/crypto/rsa/rsa_ameth.c
+++ b/lib/libssl/src/crypto/rsa/rsa_ameth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_ameth.c,v 1.12 2014/07/11 12:59:10 miod Exp $ */
+/* $OpenBSD: rsa_ameth.c,v 1.13 2015/02/11 03:55:42 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -66,9 +66,6 @@
#include <openssl/rsa.h>
#include <openssl/x509.h>
-#ifndef OPENSSL_NO_CMS
-#include <openssl/cms.h>
-#endif
#include "asn1_locl.h"
@@ -420,17 +417,6 @@ rsa_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
if (arg1 == 0)
PKCS7_RECIP_INFO_get0_alg(arg2, &alg);
break;
-#ifndef OPENSSL_NO_CMS
- case ASN1_PKEY_CTRL_CMS_SIGN:
- if (arg1 == 0)
- CMS_SignerInfo_get0_algs(arg2, NULL, NULL, NULL, &alg);
- break;
-
- case ASN1_PKEY_CTRL_CMS_ENVELOPE:
- if (arg1 == 0)
- CMS_RecipientInfo_ktri_get0_algs(arg2, NULL, NULL, &alg);
- break;
-#endif
case ASN1_PKEY_CTRL_DEFAULT_MD_NID:
*(int *)arg2 = NID_sha1;
diff --git a/lib/libssl/src/crypto/rsa/rsa_pmeth.c b/lib/libssl/src/crypto/rsa/rsa_pmeth.c
index 954190d5601..6d38a7c923c 100644
--- a/lib/libssl/src/crypto/rsa/rsa_pmeth.c
+++ b/lib/libssl/src/crypto/rsa/rsa_pmeth.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_pmeth.c,v 1.14 2014/07/11 08:44:49 jsing Exp $ */
+/* $OpenBSD: rsa_pmeth.c,v 1.15 2015/02/11 03:55:42 beck Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2006.
*/
@@ -69,9 +69,6 @@
#include <openssl/rsa.h>
#include <openssl/x509.h>
-#ifndef OPENSSL_NO_CMS
-#include <openssl/cms.h>
-#endif
#include "evp_locl.h"
#include "rsa_locl.h"
@@ -462,26 +459,6 @@ bad_pad:
case EVP_PKEY_CTRL_PKCS7_DECRYPT:
case EVP_PKEY_CTRL_PKCS7_SIGN:
return 1;
-#ifndef OPENSSL_NO_CMS
- case EVP_PKEY_CTRL_CMS_DECRYPT:
- {
- X509_ALGOR *alg = NULL;
- ASN1_OBJECT *encalg = NULL;
-
- if (p2)
- CMS_RecipientInfo_ktri_get0_algs(p2, NULL,
- NULL, &alg);
- if (alg)
- X509_ALGOR_get0(&encalg, NULL, NULL, alg);
- if (encalg && OBJ_obj2nid(encalg) == NID_rsaesOaep)
- rctx->pad_mode = RSA_PKCS1_OAEP_PADDING;
- }
- /* FALLTHROUGH */
-
- case EVP_PKEY_CTRL_CMS_ENCRYPT:
- case EVP_PKEY_CTRL_CMS_SIGN:
- return 1;
-#endif
case EVP_PKEY_CTRL_PEER_KEY:
RSAerr(RSA_F_PKEY_RSA_CTRL,
RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);