summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-08-31 10:30:16 +0000
committertb <>2024-08-31 10:30:16 +0000
commit4e01cea68ef42ce1b588ea45841f93cbe028736e (patch)
tree8b4e3dbc55c7ffd012565ca707c68ecee799d57c /src
parent10ed5961c492f4b0482e8a0ddebe9bb8f4cfeea7 (diff)
downloadopenbsd-4e01cea68ef42ce1b588ea45841f93cbe028736e.tar.gz
openbsd-4e01cea68ef42ce1b588ea45841f93cbe028736e.tar.bz2
openbsd-4e01cea68ef42ce1b588ea45841f93cbe028736e.zip
Remove DES_enc_{read,write} and DES_rw_mode
Unfortunately we'll probably never be able to get rid of DES entirely. One part of it that is old enough to be a grandparent can go, though. ok beck jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/Makefile3
-rw-r--r--src/lib/libcrypto/Symbols.list3
-rw-r--r--src/lib/libcrypto/des/des.h7
-rw-r--r--src/lib/libcrypto/des/enc_read.c86
-rw-r--r--src/lib/libcrypto/hidden/openssl/des.h5
5 files changed, 3 insertions, 101 deletions
diff --git a/src/lib/libcrypto/Makefile b/src/lib/libcrypto/Makefile
index 5a28e98a87..d8e3f96b24 100644
--- a/src/lib/libcrypto/Makefile
+++ b/src/lib/libcrypto/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.206 2024/08/31 10:28:03 tb Exp $ 1# $OpenBSD: Makefile,v 1.207 2024/08/31 10:30:16 tb Exp $
2 2
3LIB= crypto 3LIB= crypto
4LIBREBUILD=y 4LIBREBUILD=y
@@ -264,7 +264,6 @@ SRCS+= des_enc.c
264SRCS+= ecb3_enc.c 264SRCS+= ecb3_enc.c
265SRCS+= ecb_enc.c 265SRCS+= ecb_enc.c
266SRCS+= ede_cbcm_enc.c 266SRCS+= ede_cbcm_enc.c
267SRCS+= enc_read.c
268SRCS+= fcrypt.c 267SRCS+= fcrypt.c
269SRCS+= fcrypt_b.c 268SRCS+= fcrypt_b.c
270SRCS+= ofb64ede.c 269SRCS+= ofb64ede.c
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list
index 170ae8ceae..1a298c02d7 100644
--- a/src/lib/libcrypto/Symbols.list
+++ b/src/lib/libcrypto/Symbols.list
@@ -720,8 +720,6 @@ DES_ede3_cbcm_encrypt
720DES_ede3_cfb64_encrypt 720DES_ede3_cfb64_encrypt
721DES_ede3_cfb_encrypt 721DES_ede3_cfb_encrypt
722DES_ede3_ofb64_encrypt 722DES_ede3_ofb64_encrypt
723DES_enc_read
724DES_enc_write
725DES_encrypt1 723DES_encrypt1
726DES_encrypt2 724DES_encrypt2
727DES_encrypt3 725DES_encrypt3
@@ -734,7 +732,6 @@ DES_ofb_encrypt
734DES_pcbc_encrypt 732DES_pcbc_encrypt
735DES_quad_cksum 733DES_quad_cksum
736DES_random_key 734DES_random_key
737DES_rw_mode
738DES_set_key 735DES_set_key
739DES_set_key_checked 736DES_set_key_checked
740DES_set_key_unchecked 737DES_set_key_unchecked
diff --git a/src/lib/libcrypto/des/des.h b/src/lib/libcrypto/des/des.h
index bc5d35f37d..5891fcefe9 100644
--- a/src/lib/libcrypto/des/des.h
+++ b/src/lib/libcrypto/des/des.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: des.h,v 1.21 2023/07/31 05:04:06 tb Exp $ */ 1/* $OpenBSD: des.h,v 1.22 2024/08/31 10:30:16 tb Exp $ */
2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -105,7 +105,6 @@ typedef struct DES_ks {
105 DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) 105 DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
106 106
107extern int DES_check_key; /* defaults to false */ 107extern int DES_check_key; /* defaults to false */
108extern int DES_rw_mode; /* defaults to DES_PCBC_MODE */
109 108
110void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, 109void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
111 DES_key_schedule *ks1, DES_key_schedule *ks2, 110 DES_key_schedule *ks1, DES_key_schedule *ks2,
@@ -174,10 +173,6 @@ void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
174 long length, DES_key_schedule *ks1, 173 long length, DES_key_schedule *ks1,
175 DES_key_schedule *ks2, DES_key_schedule *ks3, 174 DES_key_schedule *ks2, DES_key_schedule *ks3,
176 DES_cblock *ivec, int *num); 175 DES_cblock *ivec, int *num);
177int DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
178 DES_cblock *iv);
179int DES_enc_write(int fd, const void *buf, int len, DES_key_schedule *sched,
180 DES_cblock *iv);
181char *DES_fcrypt(const char *buf, const char *salt, char *ret); 176char *DES_fcrypt(const char *buf, const char *salt, char *ret);
182char *DES_crypt(const char *buf, const char *salt); 177char *DES_crypt(const char *buf, const char *salt);
183void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits, 178void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
diff --git a/src/lib/libcrypto/des/enc_read.c b/src/lib/libcrypto/des/enc_read.c
deleted file mode 100644
index 32f7547a3f..0000000000
--- a/src/lib/libcrypto/des/enc_read.c
+++ /dev/null
@@ -1,86 +0,0 @@
1/* $OpenBSD: enc_read.c,v 1.20 2024/07/09 07:16:13 beck Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#include <stdio.h>
60
61#include <openssl/opensslconf.h>
62
63#include "des_local.h"
64
65/*
66 * XXX - remove this file in the next major bump
67 */
68
69int DES_rw_mode = DES_PCBC_MODE;
70LCRYPTO_ALIAS(DES_rw_mode);
71
72int
73DES_enc_read(int fd, void *buf, int len, DES_key_schedule *sched,
74 DES_cblock *iv)
75{
76 return -1;
77}
78LCRYPTO_ALIAS(DES_enc_read);
79
80int
81DES_enc_write(int fd, const void *_buf, int len,
82 DES_key_schedule *sched, DES_cblock *iv)
83{
84 return -1;
85}
86LCRYPTO_ALIAS(DES_enc_write);
diff --git a/src/lib/libcrypto/hidden/openssl/des.h b/src/lib/libcrypto/hidden/openssl/des.h
index e632de4b11..645181199b 100644
--- a/src/lib/libcrypto/hidden/openssl/des.h
+++ b/src/lib/libcrypto/hidden/openssl/des.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: des.h,v 1.2 2024/07/09 07:16:13 beck Exp $ */ 1/* $OpenBSD: des.h,v 1.3 2024/08/31 10:30:16 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2024 Joshua Sing <joshua@joshuasing.dev> 3 * Copyright (c) 2024 Joshua Sing <joshua@joshuasing.dev>
4 * 4 *
@@ -41,8 +41,6 @@ LCRYPTO_USED(DES_ede3_cbcm_encrypt);
41LCRYPTO_USED(DES_ede3_cfb64_encrypt); 41LCRYPTO_USED(DES_ede3_cfb64_encrypt);
42LCRYPTO_USED(DES_ede3_cfb_encrypt); 42LCRYPTO_USED(DES_ede3_cfb_encrypt);
43LCRYPTO_USED(DES_ede3_ofb64_encrypt); 43LCRYPTO_USED(DES_ede3_ofb64_encrypt);
44LCRYPTO_USED(DES_enc_read);
45LCRYPTO_USED(DES_enc_write);
46LCRYPTO_USED(DES_fcrypt); 44LCRYPTO_USED(DES_fcrypt);
47LCRYPTO_USED(DES_crypt); 45LCRYPTO_USED(DES_crypt);
48LCRYPTO_USED(DES_ofb_encrypt); 46LCRYPTO_USED(DES_ofb_encrypt);
@@ -62,7 +60,6 @@ LCRYPTO_USED(DES_cfb64_encrypt);
62LCRYPTO_USED(DES_ofb64_encrypt); 60LCRYPTO_USED(DES_ofb64_encrypt);
63#if defined(LIBRESSL_NAMESPACE) 61#if defined(LIBRESSL_NAMESPACE)
64extern LCRYPTO_USED(DES_check_key); 62extern LCRYPTO_USED(DES_check_key);
65extern LCRYPTO_USED(DES_rw_mode);
66#endif 63#endif
67 64
68#endif /* _LIBCRYPTO_DES_H */ 65#endif /* _LIBCRYPTO_DES_H */