diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/evp/evp_key.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/evp/evp_key.c')
-rw-r--r-- | src/lib/libcrypto/evp/evp_key.c | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c index dafa686f64..21eda418bc 100644 --- a/src/lib/libcrypto/evp/evp_key.c +++ b/src/lib/libcrypto/evp/evp_key.c | |||
@@ -58,15 +58,14 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "x509.h" | 61 | #include <openssl/x509.h> |
62 | #include "objects.h" | 62 | #include <openssl/objects.h> |
63 | #include "evp.h" | 63 | #include <openssl/evp.h> |
64 | 64 | ||
65 | /* should be init to zeros. */ | 65 | /* should be init to zeros. */ |
66 | static char prompt_string[80]; | 66 | static char prompt_string[80]; |
67 | 67 | ||
68 | void EVP_set_pw_prompt(prompt) | 68 | void EVP_set_pw_prompt(char *prompt) |
69 | char *prompt; | ||
70 | { | 69 | { |
71 | if (prompt == NULL) | 70 | if (prompt == NULL) |
72 | prompt_string[0]='\0'; | 71 | prompt_string[0]='\0'; |
@@ -74,7 +73,7 @@ char *prompt; | |||
74 | strncpy(prompt_string,prompt,79); | 73 | strncpy(prompt_string,prompt,79); |
75 | } | 74 | } |
76 | 75 | ||
77 | char *EVP_get_pw_prompt() | 76 | char *EVP_get_pw_prompt(void) |
78 | { | 77 | { |
79 | if (prompt_string[0] == '\0') | 78 | if (prompt_string[0] == '\0') |
80 | return(NULL); | 79 | return(NULL); |
@@ -83,29 +82,19 @@ char *EVP_get_pw_prompt() | |||
83 | } | 82 | } |
84 | 83 | ||
85 | #ifdef NO_DES | 84 | #ifdef NO_DES |
86 | int des_read_pw_string(char *buf,int len,char *prompt,int verify); | 85 | int des_read_pw_string(char *buf,int len,const char *prompt,int verify); |
87 | #endif | 86 | #endif |
88 | 87 | ||
89 | int EVP_read_pw_string(buf,len,prompt,verify) | 88 | int EVP_read_pw_string(char *buf, int len, const char *prompt, int verify) |
90 | char *buf; | ||
91 | int len; | ||
92 | char *prompt; | ||
93 | int verify; | ||
94 | { | 89 | { |
95 | if ((prompt == NULL) && (prompt_string[0] != '\0')) | 90 | if ((prompt == NULL) && (prompt_string[0] != '\0')) |
96 | prompt=prompt_string; | 91 | prompt=prompt_string; |
97 | return(des_read_pw_string(buf,len,prompt,verify)); | 92 | return(des_read_pw_string(buf,len,prompt,verify)); |
98 | } | 93 | } |
99 | 94 | ||
100 | int EVP_BytesToKey(type,md,salt,data,datal,count,key,iv) | 95 | int EVP_BytesToKey(const EVP_CIPHER *type, EVP_MD *md, unsigned char *salt, |
101 | EVP_CIPHER *type; | 96 | unsigned char *data, int datal, int count, unsigned char *key, |
102 | EVP_MD *md; | 97 | unsigned char *iv) |
103 | unsigned char *salt; | ||
104 | unsigned char *data; | ||
105 | int datal; | ||
106 | int count; | ||
107 | unsigned char *key; | ||
108 | unsigned char *iv; | ||
109 | { | 98 | { |
110 | EVP_MD_CTX c; | 99 | EVP_MD_CTX c; |
111 | unsigned char md_buf[EVP_MAX_MD_SIZE]; | 100 | unsigned char md_buf[EVP_MAX_MD_SIZE]; |