aboutsummaryrefslogtreecommitdiff
path: root/crypto/des/des_old.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-02-05 17:15:18 +0000
committerRichard Levitte <levitte@openssl.org>2002-02-05 17:15:18 +0000
commit44bdb056d4c7c72494d5d4b702bbad5cc869df03 (patch)
tree32c25f15312a2d734c4ead50e2a8497b79f60d14 /crypto/des/des_old.h
parentc31bbf1e68b7e677a3de0b60e361a041d8771dd6 (diff)
downloadopenssl-44bdb056d4c7c72494d5d4b702bbad5cc869df03.zip
openssl-44bdb056d4c7c72494d5d4b702bbad5cc869df03.tar.gz
openssl-44bdb056d4c7c72494d5d4b702bbad5cc869df03.tar.bz2
With the changed des_old API, let's complete the work by renaming the
functions in ui_compat. This gave reason to rework that part more thoroughly, so here are the changes made: 1. Add DES_read_password() and DES_read_2passwords() with the same functionality as the corresponding old des_ functions, as a convenience to the users. 2. Add UI_UTIL_read_pw_string() and UI_UTIL_read_pw() with the functionality from des_read_pw_string() and des_read_pw(), again as a concenience to the users. 3. Rename des_read_password(), des_read_2passwords(), des_read_pw_string() and des_read_pw() by changing des_ to _ossl_old_des_, and add the usual mapping macros. 4. Move the implementation of des_read_password() and des_read_2passwords() to the des directory, since they are tightly tied to DES anyway. This change was inspired by a patch from Assar Westerlund <assar@sics.se>: There are some functions that didn't get the kick-away-old-des-and- replace-des-with-DES action. Here's a patch that adds DES_ and des_ (in des_old.h) versions of des_read_pw_string et al. This patch includes some of the first des_old.h semi-colon macro fixes that I've already sent.
Diffstat (limited to 'crypto/des/des_old.h')
-rw-r--r--crypto/des/des_old.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/crypto/des/des_old.h b/crypto/des/des_old.h
index 734bfff..9807415 100644
--- a/crypto/des/des_old.h
+++ b/crypto/des/des_old.h
@@ -161,6 +161,10 @@ typedef struct des_ks_struct
_ossl_old_des_random_seed((k))
#define des_random_key(r)\
_ossl_old_des_random_key((r))
+#define des_read_password(k,p,v) \
+ _ossl_old_des_read_password((k),(p),(v))
+#define des_read_2passwords(k1,k2,p,v) \
+ _ossl_old_des_read_2passwords((k1),(k2),(p),(v))
#define des_set_odd_parity(k)\
_ossl_old_des_set_odd_parity((k))
#define des_is_weak_key(k)\
@@ -247,6 +251,9 @@ DES_LONG _ossl_old_des_quad_cksum(des_cblock *input,des_cblock *output,
long length,int out_count,des_cblock *seed);
void _ossl_old_des_random_seed(des_cblock key);
void _ossl_old_des_random_key(des_cblock ret);
+int _ossl_old_des_read_password(des_cblock *key,const char *prompt,int verify);
+int _ossl_old_des_read_2passwords(des_cblock *key1,des_cblock *key2,
+ const char *prompt,int verify);
void _ossl_old_des_set_odd_parity(des_cblock *key);
int _ossl_old_des_is_weak_key(des_cblock *key);
int _ossl_old_des_set_key(des_cblock *key,des_key_schedule schedule);
@@ -296,4 +303,7 @@ void _ossl_old_des_ofb64_encrypt(unsigned char *in, unsigned char *out, long len
}
#endif
+/* for DES_read_pw_string et al */
+#include <openssl/ui_compat.h>
+
#endif