summaryrefslogtreecommitdiffstats
path: root/crypto/ui
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-12-16 22:12:24 +0100
committerRich Salz <rsalz@openssl.org>2015-12-16 22:14:49 +0100
commit7644a9aef8932ed4d1c3f25ed776c997702982be (patch)
treed8f1e7fca20ad12683a1e2e52c92b6999ada23a6 /crypto/ui
parentfix for no-ec (diff)
downloadopenssl-7644a9aef8932ed4d1c3f25ed776c997702982be.tar.xz
openssl-7644a9aef8932ed4d1c3f25ed776c997702982be.zip
Rename some BUF_xxx to OPENSSL_xxx
Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ui')
-rw-r--r--crypto/ui/ui_lib.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/crypto/ui/ui_lib.c b/crypto/ui/ui_lib.c
index d2ac28ba7f..ea3ec139e1 100644
--- a/crypto/ui/ui_lib.c
+++ b/crypto/ui/ui_lib.c
@@ -238,7 +238,7 @@ int UI_dup_input_string(UI *ui, const char *prompt, int flags,
char *prompt_copy = NULL;
if (prompt) {
- prompt_copy = BUF_strdup(prompt);
+ prompt_copy = OPENSSL_strdup(prompt);
if (prompt_copy == NULL) {
UIerr(UI_F_UI_DUP_INPUT_STRING, ERR_R_MALLOC_FAILURE);
return 0;
@@ -266,7 +266,7 @@ int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
char *prompt_copy = NULL;
if (prompt) {
- prompt_copy = BUF_strdup(prompt);
+ prompt_copy = OPENSSL_strdup(prompt);
if (prompt_copy == NULL) {
UIerr(UI_F_UI_DUP_VERIFY_STRING, ERR_R_MALLOC_FAILURE);
return -1;
@@ -297,7 +297,7 @@ int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
char *cancel_chars_copy = NULL;
if (prompt) {
- prompt_copy = BUF_strdup(prompt);
+ prompt_copy = OPENSSL_strdup(prompt);
if (prompt_copy == NULL) {
UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
goto err;
@@ -305,7 +305,7 @@ int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
}
if (action_desc) {
- action_desc_copy = BUF_strdup(action_desc);
+ action_desc_copy = OPENSSL_strdup(action_desc);
if (action_desc_copy == NULL) {
UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
goto err;
@@ -313,7 +313,7 @@ int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
}
if (ok_chars) {
- ok_chars_copy = BUF_strdup(ok_chars);
+ ok_chars_copy = OPENSSL_strdup(ok_chars);
if (ok_chars_copy == NULL) {
UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
goto err;
@@ -321,7 +321,7 @@ int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
}
if (cancel_chars) {
- cancel_chars_copy = BUF_strdup(cancel_chars);
+ cancel_chars_copy = OPENSSL_strdup(cancel_chars);
if (cancel_chars_copy == NULL) {
UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
goto err;
@@ -350,7 +350,7 @@ int UI_dup_info_string(UI *ui, const char *text)
char *text_copy = NULL;
if (text) {
- text_copy = BUF_strdup(text);
+ text_copy = OPENSSL_strdup(text);
if (text_copy == NULL) {
UIerr(UI_F_UI_DUP_INFO_STRING, ERR_R_MALLOC_FAILURE);
return -1;
@@ -372,7 +372,7 @@ int UI_dup_error_string(UI *ui, const char *text)
char *text_copy = NULL;
if (text) {
- text_copy = BUF_strdup(text);
+ text_copy = OPENSSL_strdup(text);
if (text_copy == NULL) {
UIerr(UI_F_UI_DUP_ERROR_STRING, ERR_R_MALLOC_FAILURE);
return -1;
@@ -405,13 +405,13 @@ char *UI_construct_prompt(UI *ui, const char *object_desc,
prompt = OPENSSL_malloc(len + 1);
if (prompt == NULL)
return NULL;
- BUF_strlcpy(prompt, prompt1, len + 1);
- BUF_strlcat(prompt, object_desc, len + 1);
+ OPENSSL_strlcpy(prompt, prompt1, len + 1);
+ OPENSSL_strlcat(prompt, object_desc, len + 1);
if (object_name) {
- BUF_strlcat(prompt, prompt2, len + 1);
- BUF_strlcat(prompt, object_name, len + 1);
+ OPENSSL_strlcat(prompt, prompt2, len + 1);
+ OPENSSL_strlcat(prompt, object_name, len + 1);
}
- BUF_strlcat(prompt, prompt3, len + 1);
+ OPENSSL_strlcat(prompt, prompt3, len + 1);
}
return prompt;
}
@@ -575,7 +575,7 @@ UI_METHOD *UI_create_method(char *name)
UI_METHOD *ui_method = OPENSSL_zalloc(sizeof(*ui_method));
if (ui_method != NULL)
- ui_method->name = BUF_strdup(name);
+ ui_method->name = OPENSSL_strdup(name);
return ui_method;
}
@@ -822,7 +822,7 @@ int UI_set_result(UI *ui, UI_STRING *uis, const char *result)
return -1;
}
- BUF_strlcpy(uis->result_buf, result,
+ OPENSSL_strlcpy(uis->result_buf, result,
uis->_.string_data.result_maxsize + 1);
break;
case UIT_BOOLEAN: