diff options
author | miod <> | 2014-04-16 04:31:32 +0000 |
---|---|---|
committer | miod <> | 2014-04-16 04:31:32 +0000 |
commit | ee3114a29a78969f6101144226487c5e6a646188 (patch) | |
tree | 37ef6c765be623cfdd49dc95405a80e8273422ca /src | |
parent | 5ebad8aceae77c6da6a1e47c3f7e70e8ffae3dae (diff) | |
download | openbsd-ee3114a29a78969f6101144226487c5e6a646188.tar.gz openbsd-ee3114a29a78969f6101144226487c5e6a646188.tar.bz2 openbsd-ee3114a29a78969f6101144226487c5e6a646188.zip |
Remove DES_read_password and DES_read_2passwords which are `modern' flavours
of des_old.h routines, acting as wrappers about the OpenSSL UI API.
Nothing should use these functions directly.
Riding the recent libcrypto major bump (in a `des' car).
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/crypto/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/des/des.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/des/read2pwd.c | 140 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/des/des.h | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/des/read2pwd.c | 140 |
5 files changed, 1 insertions, 290 deletions
diff --git a/src/lib/libcrypto/crypto/Makefile b/src/lib/libcrypto/crypto/Makefile index 1e95a60209..4bc42e35b9 100644 --- a/src/lib/libcrypto/crypto/Makefile +++ b/src/lib/libcrypto/crypto/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.14 2014/04/16 03:24:53 beck Exp $ | 1 | # $OpenBSD: Makefile,v 1.15 2014/04/16 04:31:32 miod Exp $ |
2 | 2 | ||
3 | LIB= crypto | 3 | LIB= crypto |
4 | 4 | ||
@@ -112,7 +112,6 @@ SRCS+= ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c | |||
112 | SRCS+= fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c | 112 | SRCS+= fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c |
113 | SRCS+= qud_cksm.c rand_key.c rpc_enc.c set_key.c xcbc_enc.c | 113 | SRCS+= qud_cksm.c rand_key.c rpc_enc.c set_key.c xcbc_enc.c |
114 | SRCS+= str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c | 114 | SRCS+= str2key.c cfb64ede.c ofb64ede.c ede_cbcm_enc.c |
115 | SRCS+= read2pwd.c | ||
116 | 115 | ||
117 | # dh/ | 116 | # dh/ |
118 | SRCS+= dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c dh_depr.c | 117 | SRCS+= dh_asn1.c dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c dh_depr.c |
diff --git a/src/lib/libcrypto/des/des.h b/src/lib/libcrypto/des/des.h index c06b706e9c..122fc1403c 100644 --- a/src/lib/libcrypto/des/des.h +++ b/src/lib/libcrypto/des/des.h | |||
@@ -222,10 +222,6 @@ void DES_cfb64_encrypt(const unsigned char *in,unsigned char *out,long length, | |||
222 | void DES_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length, | 222 | void DES_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length, |
223 | DES_key_schedule *schedule,DES_cblock *ivec,int *num); | 223 | DES_key_schedule *schedule,DES_cblock *ivec,int *num); |
224 | 224 | ||
225 | int DES_read_password(DES_cblock *key, const char *prompt, int verify); | ||
226 | int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, const char *prompt, | ||
227 | int verify); | ||
228 | |||
229 | #define DES_fixup_key_parity DES_set_odd_parity | 225 | #define DES_fixup_key_parity DES_set_odd_parity |
230 | 226 | ||
231 | #ifdef __cplusplus | 227 | #ifdef __cplusplus |
diff --git a/src/lib/libcrypto/des/read2pwd.c b/src/lib/libcrypto/des/read2pwd.c deleted file mode 100644 index ee6969f76e..0000000000 --- a/src/lib/libcrypto/des/read2pwd.c +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* crypto/des/read2pwd.c */ | ||
2 | /* ==================================================================== | ||
3 | * Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | * This product includes cryptographic software written by Eric Young | ||
51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
52 | * Hudson (tjh@cryptsoft.com). | ||
53 | * | ||
54 | */ | ||
55 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
56 | * All rights reserved. | ||
57 | * | ||
58 | * This package is an SSL implementation written | ||
59 | * by Eric Young (eay@cryptsoft.com). | ||
60 | * The implementation was written so as to conform with Netscapes SSL. | ||
61 | * | ||
62 | * This library is free for commercial and non-commercial use as long as | ||
63 | * the following conditions are aheared to. The following conditions | ||
64 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
65 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
66 | * included with this distribution is covered by the same copyright terms | ||
67 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
68 | * | ||
69 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
70 | * the code are not to be removed. | ||
71 | * If this package is used in a product, Eric Young should be given attribution | ||
72 | * as the author of the parts of the library used. | ||
73 | * This can be in the form of a textual message at program startup or | ||
74 | * in documentation (online or textual) provided with the package. | ||
75 | * | ||
76 | * Redistribution and use in source and binary forms, with or without | ||
77 | * modification, are permitted provided that the following conditions | ||
78 | * are met: | ||
79 | * 1. Redistributions of source code must retain the copyright | ||
80 | * notice, this list of conditions and the following disclaimer. | ||
81 | * 2. Redistributions in binary form must reproduce the above copyright | ||
82 | * notice, this list of conditions and the following disclaimer in the | ||
83 | * documentation and/or other materials provided with the distribution. | ||
84 | * 3. All advertising materials mentioning features or use of this software | ||
85 | * must display the following acknowledgement: | ||
86 | * "This product includes cryptographic software written by | ||
87 | * Eric Young (eay@cryptsoft.com)" | ||
88 | * The word 'cryptographic' can be left out if the rouines from the library | ||
89 | * being used are not cryptographic related :-). | ||
90 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
91 | * the apps directory (application code) you must include an acknowledgement: | ||
92 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
93 | * | ||
94 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
95 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
96 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
97 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
98 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
99 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
100 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
101 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
102 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
103 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
104 | * SUCH DAMAGE. | ||
105 | * | ||
106 | * The licence and distribution terms for any publically available version or | ||
107 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
108 | * copied and put under another distribution licence | ||
109 | * [including the GNU Public Licence.] | ||
110 | */ | ||
111 | |||
112 | #include <string.h> | ||
113 | #include <openssl/des.h> | ||
114 | #include <openssl/ui.h> | ||
115 | #include <openssl/crypto.h> | ||
116 | |||
117 | int DES_read_password(DES_cblock *key, const char *prompt, int verify) | ||
118 | { | ||
119 | int ok; | ||
120 | char buf[BUFSIZ],buff[BUFSIZ]; | ||
121 | |||
122 | if ((ok=UI_UTIL_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) | ||
123 | DES_string_to_key(buf,key); | ||
124 | OPENSSL_cleanse(buf,BUFSIZ); | ||
125 | OPENSSL_cleanse(buff,BUFSIZ); | ||
126 | return(ok); | ||
127 | } | ||
128 | |||
129 | int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, const char *prompt, | ||
130 | int verify) | ||
131 | { | ||
132 | int ok; | ||
133 | char buf[BUFSIZ],buff[BUFSIZ]; | ||
134 | |||
135 | if ((ok=UI_UTIL_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) | ||
136 | DES_string_to_2keys(buf,key1,key2); | ||
137 | OPENSSL_cleanse(buf,BUFSIZ); | ||
138 | OPENSSL_cleanse(buff,BUFSIZ); | ||
139 | return(ok); | ||
140 | } | ||
diff --git a/src/lib/libssl/src/crypto/des/des.h b/src/lib/libssl/src/crypto/des/des.h index c06b706e9c..122fc1403c 100644 --- a/src/lib/libssl/src/crypto/des/des.h +++ b/src/lib/libssl/src/crypto/des/des.h | |||
@@ -222,10 +222,6 @@ void DES_cfb64_encrypt(const unsigned char *in,unsigned char *out,long length, | |||
222 | void DES_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length, | 222 | void DES_ofb64_encrypt(const unsigned char *in,unsigned char *out,long length, |
223 | DES_key_schedule *schedule,DES_cblock *ivec,int *num); | 223 | DES_key_schedule *schedule,DES_cblock *ivec,int *num); |
224 | 224 | ||
225 | int DES_read_password(DES_cblock *key, const char *prompt, int verify); | ||
226 | int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, const char *prompt, | ||
227 | int verify); | ||
228 | |||
229 | #define DES_fixup_key_parity DES_set_odd_parity | 225 | #define DES_fixup_key_parity DES_set_odd_parity |
230 | 226 | ||
231 | #ifdef __cplusplus | 227 | #ifdef __cplusplus |
diff --git a/src/lib/libssl/src/crypto/des/read2pwd.c b/src/lib/libssl/src/crypto/des/read2pwd.c deleted file mode 100644 index ee6969f76e..0000000000 --- a/src/lib/libssl/src/crypto/des/read2pwd.c +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* crypto/des/read2pwd.c */ | ||
2 | /* ==================================================================== | ||
3 | * Copyright (c) 2001-2002 The OpenSSL Project. All rights reserved. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions | ||
7 | * are met: | ||
8 | * | ||
9 | * 1. Redistributions of source code must retain the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer. | ||
11 | * | ||
12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer in | ||
14 | * the documentation and/or other materials provided with the | ||
15 | * distribution. | ||
16 | * | ||
17 | * 3. All advertising materials mentioning features or use of this | ||
18 | * software must display the following acknowledgment: | ||
19 | * "This product includes software developed by the OpenSSL Project | ||
20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
21 | * | ||
22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
23 | * endorse or promote products derived from this software without | ||
24 | * prior written permission. For written permission, please contact | ||
25 | * openssl-core@openssl.org. | ||
26 | * | ||
27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
28 | * nor may "OpenSSL" appear in their names without prior written | ||
29 | * permission of the OpenSSL Project. | ||
30 | * | ||
31 | * 6. Redistributions of any form whatsoever must retain the following | ||
32 | * acknowledgment: | ||
33 | * "This product includes software developed by the OpenSSL Project | ||
34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
35 | * | ||
36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
48 | * ==================================================================== | ||
49 | * | ||
50 | * This product includes cryptographic software written by Eric Young | ||
51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
52 | * Hudson (tjh@cryptsoft.com). | ||
53 | * | ||
54 | */ | ||
55 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
56 | * All rights reserved. | ||
57 | * | ||
58 | * This package is an SSL implementation written | ||
59 | * by Eric Young (eay@cryptsoft.com). | ||
60 | * The implementation was written so as to conform with Netscapes SSL. | ||
61 | * | ||
62 | * This library is free for commercial and non-commercial use as long as | ||
63 | * the following conditions are aheared to. The following conditions | ||
64 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
65 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
66 | * included with this distribution is covered by the same copyright terms | ||
67 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
68 | * | ||
69 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
70 | * the code are not to be removed. | ||
71 | * If this package is used in a product, Eric Young should be given attribution | ||
72 | * as the author of the parts of the library used. | ||
73 | * This can be in the form of a textual message at program startup or | ||
74 | * in documentation (online or textual) provided with the package. | ||
75 | * | ||
76 | * Redistribution and use in source and binary forms, with or without | ||
77 | * modification, are permitted provided that the following conditions | ||
78 | * are met: | ||
79 | * 1. Redistributions of source code must retain the copyright | ||
80 | * notice, this list of conditions and the following disclaimer. | ||
81 | * 2. Redistributions in binary form must reproduce the above copyright | ||
82 | * notice, this list of conditions and the following disclaimer in the | ||
83 | * documentation and/or other materials provided with the distribution. | ||
84 | * 3. All advertising materials mentioning features or use of this software | ||
85 | * must display the following acknowledgement: | ||
86 | * "This product includes cryptographic software written by | ||
87 | * Eric Young (eay@cryptsoft.com)" | ||
88 | * The word 'cryptographic' can be left out if the rouines from the library | ||
89 | * being used are not cryptographic related :-). | ||
90 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
91 | * the apps directory (application code) you must include an acknowledgement: | ||
92 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
93 | * | ||
94 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
95 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
96 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
97 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
98 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
99 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
100 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
101 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
102 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
103 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
104 | * SUCH DAMAGE. | ||
105 | * | ||
106 | * The licence and distribution terms for any publically available version or | ||
107 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
108 | * copied and put under another distribution licence | ||
109 | * [including the GNU Public Licence.] | ||
110 | */ | ||
111 | |||
112 | #include <string.h> | ||
113 | #include <openssl/des.h> | ||
114 | #include <openssl/ui.h> | ||
115 | #include <openssl/crypto.h> | ||
116 | |||
117 | int DES_read_password(DES_cblock *key, const char *prompt, int verify) | ||
118 | { | ||
119 | int ok; | ||
120 | char buf[BUFSIZ],buff[BUFSIZ]; | ||
121 | |||
122 | if ((ok=UI_UTIL_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) | ||
123 | DES_string_to_key(buf,key); | ||
124 | OPENSSL_cleanse(buf,BUFSIZ); | ||
125 | OPENSSL_cleanse(buff,BUFSIZ); | ||
126 | return(ok); | ||
127 | } | ||
128 | |||
129 | int DES_read_2passwords(DES_cblock *key1, DES_cblock *key2, const char *prompt, | ||
130 | int verify) | ||
131 | { | ||
132 | int ok; | ||
133 | char buf[BUFSIZ],buff[BUFSIZ]; | ||
134 | |||
135 | if ((ok=UI_UTIL_read_pw(buf,buff,BUFSIZ,prompt,verify)) == 0) | ||
136 | DES_string_to_2keys(buf,key1,key2); | ||
137 | OPENSSL_cleanse(buf,BUFSIZ); | ||
138 | OPENSSL_cleanse(buff,BUFSIZ); | ||
139 | return(ok); | ||
140 | } | ||