Changeset 94082 in vbox for trunk/src/libs/openssl-3.0.1/crypto/ui
- Timestamp:
- Mar 3, 2022 7:17:34 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150325
- Location:
- trunk/src/libs/openssl-3.0.1
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.1
- Property svn:mergeinfo
-
old new 12 12 /vendor/openssl/1.1.1c:131722-131725 13 13 /vendor/openssl/1.1.1k:145841-145843 14 /vendor/openssl/3.0.1:150323-150324 15 /vendor/openssl/current:147554-150322
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.1/crypto/ui/ui_err.c
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 18The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 11 11 #include <openssl/err.h> 12 12 #include <openssl/uierr.h> 13 #include "crypto/uierr.h" 13 14 14 15 #ifndef OPENSSL_NO_ERR 15 16 static const ERR_STRING_DATA UI_str_functs[] = {17 {ERR_PACK(ERR_LIB_UI, UI_F_CLOSE_CONSOLE, 0), "close_console"},18 {ERR_PACK(ERR_LIB_UI, UI_F_ECHO_CONSOLE, 0), "echo_console"},19 {ERR_PACK(ERR_LIB_UI, UI_F_GENERAL_ALLOCATE_BOOLEAN, 0),20 "general_allocate_boolean"},21 {ERR_PACK(ERR_LIB_UI, UI_F_GENERAL_ALLOCATE_PROMPT, 0),22 "general_allocate_prompt"},23 {ERR_PACK(ERR_LIB_UI, UI_F_NOECHO_CONSOLE, 0), "noecho_console"},24 {ERR_PACK(ERR_LIB_UI, UI_F_OPEN_CONSOLE, 0), "open_console"},25 {ERR_PACK(ERR_LIB_UI, UI_F_UI_CONSTRUCT_PROMPT, 0), "UI_construct_prompt"},26 {ERR_PACK(ERR_LIB_UI, UI_F_UI_CREATE_METHOD, 0), "UI_create_method"},27 {ERR_PACK(ERR_LIB_UI, UI_F_UI_CTRL, 0), "UI_ctrl"},28 {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_ERROR_STRING, 0), "UI_dup_error_string"},29 {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_INFO_STRING, 0), "UI_dup_info_string"},30 {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_INPUT_BOOLEAN, 0),31 "UI_dup_input_boolean"},32 {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_INPUT_STRING, 0), "UI_dup_input_string"},33 {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_USER_DATA, 0), "UI_dup_user_data"},34 {ERR_PACK(ERR_LIB_UI, UI_F_UI_DUP_VERIFY_STRING, 0),35 "UI_dup_verify_string"},36 {ERR_PACK(ERR_LIB_UI, UI_F_UI_GET0_RESULT, 0), "UI_get0_result"},37 {ERR_PACK(ERR_LIB_UI, UI_F_UI_GET_RESULT_LENGTH, 0),38 "UI_get_result_length"},39 {ERR_PACK(ERR_LIB_UI, UI_F_UI_NEW_METHOD, 0), "UI_new_method"},40 {ERR_PACK(ERR_LIB_UI, UI_F_UI_PROCESS, 0), "UI_process"},41 {ERR_PACK(ERR_LIB_UI, UI_F_UI_SET_RESULT, 0), "UI_set_result"},42 {ERR_PACK(ERR_LIB_UI, UI_F_UI_SET_RESULT_EX, 0), "UI_set_result_ex"},43 {0, NULL}44 };45 16 46 17 static const ERR_STRING_DATA UI_str_reasons[] = { … … 67 38 #endif 68 39 69 int ERR_load_UI_strings(void)40 int ossl_err_load_UI_strings(void) 70 41 { 71 42 #ifndef OPENSSL_NO_ERR 72 if (ERR_func_error_string(UI_str_functs[0].error) == NULL) { 73 ERR_load_strings_const(UI_str_functs); 43 if (ERR_reason_error_string(UI_str_reasons[0].error) == NULL) 74 44 ERR_load_strings_const(UI_str_reasons); 75 }76 45 #endif 77 46 return 1; -
trunk/src/libs/openssl-3.0.1/crypto/ui/ui_lib.c
r91772 r94082 1 1 /* 2 * Copyright 2001-20 19The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 26 26 27 27 if (ret == NULL) { 28 UIerr(UI_F_UI_NEW_METHOD, ERR_R_MALLOC_FAILURE);28 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 29 29 return NULL; 30 30 } … … 32 32 ret->lock = CRYPTO_THREAD_lock_new(); 33 33 if (ret->lock == NULL) { 34 UIerr(UI_F_UI_NEW_METHOD, ERR_R_MALLOC_FAILURE);34 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 35 35 OPENSSL_free(ret); 36 36 return NULL; … … 44 44 45 45 if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_UI, ret, &ret->ex_data)) { 46 OPENSSL_free(ret);46 UI_free(ret); 47 47 return NULL; 48 48 } … … 103 103 104 104 if (prompt == NULL) { 105 UIerr(UI_F_GENERAL_ALLOCATE_PROMPT, ERR_R_PASSED_NULL_PARAMETER);105 ERR_raise(ERR_LIB_UI, ERR_R_PASSED_NULL_PARAMETER); 106 106 } else if ((type == UIT_PROMPT || type == UIT_VERIFY 107 107 || type == UIT_BOOLEAN) && result_buf == NULL) { 108 UIerr(UI_F_GENERAL_ALLOCATE_PROMPT, UI_R_NO_RESULT_BUFFER);109 } else if ((ret = OPENSSL_ malloc(sizeof(*ret))) != NULL) {108 ERR_raise(ERR_LIB_UI, UI_R_NO_RESULT_BUFFER); 109 } else if ((ret = OPENSSL_zalloc(sizeof(*ret))) != NULL) { 110 110 ret->out_string = prompt; 111 111 ret->flags = prompt_freeable ? OUT_STRING_FREEABLE : 0; … … 158 158 159 159 if (ok_chars == NULL) { 160 UIerr(UI_F_GENERAL_ALLOCATE_BOOLEAN, ERR_R_PASSED_NULL_PARAMETER);160 ERR_raise(ERR_LIB_UI, ERR_R_PASSED_NULL_PARAMETER); 161 161 } else if (cancel_chars == NULL) { 162 UIerr(UI_F_GENERAL_ALLOCATE_BOOLEAN, ERR_R_PASSED_NULL_PARAMETER);162 ERR_raise(ERR_LIB_UI, ERR_R_PASSED_NULL_PARAMETER); 163 163 } else { 164 164 for (p = ok_chars; *p != '\0'; p++) { 165 165 if (strchr(cancel_chars, *p) != NULL) { 166 UIerr(UI_F_GENERAL_ALLOCATE_BOOLEAN, 167 UI_R_COMMON_OK_AND_CANCEL_CHARACTERS); 166 ERR_raise(ERR_LIB_UI, UI_R_COMMON_OK_AND_CANCEL_CHARACTERS); 168 167 } 169 168 } … … 213 212 prompt_copy = OPENSSL_strdup(prompt); 214 213 if (prompt_copy == NULL) { 215 UIerr(UI_F_UI_DUP_INPUT_STRING, ERR_R_MALLOC_FAILURE);214 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 216 215 return 0; 217 216 } … … 241 240 prompt_copy = OPENSSL_strdup(prompt); 242 241 if (prompt_copy == NULL) { 243 UIerr(UI_F_UI_DUP_VERIFY_STRING, ERR_R_MALLOC_FAILURE);242 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 244 243 return -1; 245 244 } … … 272 271 prompt_copy = OPENSSL_strdup(prompt); 273 272 if (prompt_copy == NULL) { 274 UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);273 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 275 274 goto err; 276 275 } … … 280 279 action_desc_copy = OPENSSL_strdup(action_desc); 281 280 if (action_desc_copy == NULL) { 282 UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);281 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 283 282 goto err; 284 283 } … … 288 287 ok_chars_copy = OPENSSL_strdup(ok_chars); 289 288 if (ok_chars_copy == NULL) { 290 UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);289 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 291 290 goto err; 292 291 } … … 296 295 cancel_chars_copy = OPENSSL_strdup(cancel_chars); 297 296 if (cancel_chars_copy == NULL) { 298 UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);297 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 299 298 goto err; 300 299 } … … 325 324 text_copy = OPENSSL_strdup(text); 326 325 if (text_copy == NULL) { 327 UIerr(UI_F_UI_DUP_INFO_STRING, ERR_R_MALLOC_FAILURE);326 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 328 327 return -1; 329 328 } … … 347 346 text_copy = OPENSSL_strdup(text); 348 347 if (text_copy == NULL) { 349 UIerr(UI_F_UI_DUP_ERROR_STRING, ERR_R_MALLOC_FAILURE);348 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 350 349 return -1; 351 350 } … … 355 354 } 356 355 357 char *UI_construct_prompt(UI *ui, const char * object_desc,356 char *UI_construct_prompt(UI *ui, const char *phrase_desc, 358 357 const char *object_name) 359 358 { 360 359 char *prompt = NULL; 361 360 362 if (ui ->meth->ui_construct_prompt != NULL)363 prompt = ui->meth->ui_construct_prompt(ui, object_desc, object_name);361 if (ui != NULL && ui->meth != NULL && ui->meth->ui_construct_prompt != NULL) 362 prompt = ui->meth->ui_construct_prompt(ui, phrase_desc, object_name); 364 363 else { 365 364 char prompt1[] = "Enter "; … … 368 367 int len = 0; 369 368 370 if ( object_desc == NULL)369 if (phrase_desc == NULL) 371 370 return NULL; 372 len = sizeof(prompt1) - 1 + strlen( object_desc);371 len = sizeof(prompt1) - 1 + strlen(phrase_desc); 373 372 if (object_name != NULL) 374 373 len += sizeof(prompt2) - 1 + strlen(object_name); … … 376 375 377 376 if ((prompt = OPENSSL_malloc(len + 1)) == NULL) { 378 UIerr(UI_F_UI_CONSTRUCT_PROMPT, ERR_R_MALLOC_FAILURE);377 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 379 378 return NULL; 380 379 } 381 380 OPENSSL_strlcpy(prompt, prompt1, len + 1); 382 OPENSSL_strlcat(prompt, object_desc, len + 1);381 OPENSSL_strlcat(prompt, phrase_desc, len + 1); 383 382 if (object_name != NULL) { 384 383 OPENSSL_strlcat(prompt, prompt2, len + 1); … … 409 408 if (ui->meth->ui_duplicate_data == NULL 410 409 || ui->meth->ui_destroy_data == NULL) { 411 UIerr(UI_F_UI_DUP_USER_DATA, UI_R_USER_DATA_DUPLICATION_UNSUPPORTED);410 ERR_raise(ERR_LIB_UI, UI_R_USER_DATA_DUPLICATION_UNSUPPORTED); 412 411 return -1; 413 412 } … … 415 414 duplicate = ui->meth->ui_duplicate_data(ui, user_data); 416 415 if (duplicate == NULL) { 417 UIerr(UI_F_UI_DUP_USER_DATA, ERR_R_MALLOC_FAILURE);416 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 418 417 return -1; 419 418 } … … 433 432 { 434 433 if (i < 0) { 435 UIerr(UI_F_UI_GET0_RESULT, UI_R_INDEX_TOO_SMALL);434 ERR_raise(ERR_LIB_UI, UI_R_INDEX_TOO_SMALL); 436 435 return NULL; 437 436 } 438 437 if (i >= sk_UI_STRING_num(ui->strings)) { 439 UIerr(UI_F_UI_GET0_RESULT, UI_R_INDEX_TOO_LARGE);438 ERR_raise(ERR_LIB_UI, UI_R_INDEX_TOO_LARGE); 440 439 return NULL; 441 440 } … … 446 445 { 447 446 if (i < 0) { 448 UIerr(UI_F_UI_GET_RESULT_LENGTH, UI_R_INDEX_TOO_SMALL);447 ERR_raise(ERR_LIB_UI, UI_R_INDEX_TOO_SMALL); 449 448 return -1; 450 449 } 451 450 if (i >= sk_UI_STRING_num(ui->strings)) { 452 UIerr(UI_F_UI_GET_RESULT_LENGTH, UI_R_INDEX_TOO_LARGE);451 ERR_raise(ERR_LIB_UI, UI_R_INDEX_TOO_LARGE); 453 452 return -1; 454 453 } … … 542 541 } 543 542 544 if (ok == -1) { 545 UIerr(UI_F_UI_PROCESS, UI_R_PROCESSING_ERROR); 546 ERR_add_error_data(2, "while ", state); 547 } 543 if (ok == -1) 544 ERR_raise_data(ERR_LIB_UI, UI_R_PROCESSING_ERROR, "while %s", state); 548 545 return ok; 549 546 } … … 552 549 { 553 550 if (ui == NULL) { 554 UIerr(UI_F_UI_CTRL, ERR_R_PASSED_NULL_PARAMETER);551 ERR_raise(ERR_LIB_UI, ERR_R_PASSED_NULL_PARAMETER); 555 552 return -1; 556 553 } … … 570 567 break; 571 568 } 572 UIerr(UI_F_UI_CTRL, UI_R_UNKNOWN_CONTROL_COMMAND);569 ERR_raise(ERR_LIB_UI, UI_R_UNKNOWN_CONTROL_COMMAND); 573 570 return -1; 574 571 } … … 579 576 } 580 577 581 void *UI_get_ex_data( UI *r, int idx)578 void *UI_get_ex_data(const UI *r, int idx) 582 579 { 583 580 return CRYPTO_get_ex_data(&r->ex_data, idx); … … 606 603 OPENSSL_free(ui_method->name); 607 604 OPENSSL_free(ui_method); 608 UIerr(UI_F_UI_CREATE_METHOD, ERR_R_MALLOC_FAILURE);605 ERR_raise(ERR_LIB_UI, ERR_R_MALLOC_FAILURE); 609 606 return NULL; 610 607 } … … 689 686 int UI_method_set_prompt_constructor(UI_METHOD *method, 690 687 char *(*prompt_constructor) (UI *ui, 691 const char 692 *object_desc, 693 const char 694 *object_name)) 688 const char *, 689 const char *)) 695 690 { 696 691 if (method != NULL) { … … 875 870 int UI_set_result(UI *ui, UI_STRING *uis, const char *result) 876 871 { 877 #if 0878 /*879 * This is placed here solely to preserve UI_F_UI_SET_RESULT880 * To be removed for OpenSSL 1.2.0881 */882 UIerr(UI_F_UI_SET_RESULT, ERR_R_DISABLED);883 #endif884 872 return UI_set_result_ex(ui, uis, result, strlen(result)); 885 873 } … … 892 880 case UIT_PROMPT: 893 881 case UIT_VERIFY: 894 { 895 char number1[DECIMAL_SIZE(uis->_.string_data.result_minsize) + 1]; 896 char number2[DECIMAL_SIZE(uis->_.string_data.result_maxsize) + 1]; 897 898 BIO_snprintf(number1, sizeof(number1), "%d", 899 uis->_.string_data.result_minsize); 900 BIO_snprintf(number2, sizeof(number2), "%d", 901 uis->_.string_data.result_maxsize); 902 903 if (len < uis->_.string_data.result_minsize) { 904 ui->flags |= UI_FLAG_REDOABLE; 905 UIerr(UI_F_UI_SET_RESULT_EX, UI_R_RESULT_TOO_SMALL); 906 ERR_add_error_data(5, "You must type in ", 907 number1, " to ", number2, " characters"); 908 return -1; 909 } 910 if (len > uis->_.string_data.result_maxsize) { 911 ui->flags |= UI_FLAG_REDOABLE; 912 UIerr(UI_F_UI_SET_RESULT_EX, UI_R_RESULT_TOO_LARGE); 913 ERR_add_error_data(5, "You must type in ", 914 number1, " to ", number2, " characters"); 915 return -1; 916 } 882 if (len < uis->_.string_data.result_minsize) { 883 ui->flags |= UI_FLAG_REDOABLE; 884 ERR_raise_data(ERR_LIB_UI, UI_R_RESULT_TOO_SMALL, 885 "You must type in %d to %d characters", 886 uis->_.string_data.result_minsize, 887 uis->_.string_data.result_maxsize); 888 return -1; 889 } 890 if (len > uis->_.string_data.result_maxsize) { 891 ui->flags |= UI_FLAG_REDOABLE; 892 ERR_raise_data(ERR_LIB_UI, UI_R_RESULT_TOO_LARGE, 893 "You must type in %d to %d characters", 894 uis->_.string_data.result_minsize, 895 uis->_.string_data.result_maxsize); 896 return -1; 917 897 } 918 898 919 899 if (uis->result_buf == NULL) { 920 UIerr(UI_F_UI_SET_RESULT_EX, UI_R_NO_RESULT_BUFFER);900 ERR_raise(ERR_LIB_UI, UI_R_NO_RESULT_BUFFER); 921 901 return -1; 922 902 } … … 932 912 933 913 if (uis->result_buf == NULL) { 934 UIerr(UI_F_UI_SET_RESULT_EX, UI_R_NO_RESULT_BUFFER);914 ERR_raise(ERR_LIB_UI, UI_R_NO_RESULT_BUFFER); 935 915 return -1; 936 916 } -
trunk/src/libs/openssl-3.0.1/crypto/ui/ui_local.h
r91772 r94082 2 2 * Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at -
trunk/src/libs/openssl-3.0.1/crypto/ui/ui_null.c
r91772 r94082 2 2 * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at -
trunk/src/libs/openssl-3.0.1/crypto/ui/ui_openssl.c
r91772 r94082 1 1 /* 2 * Copyright 2001-202 0The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 35 35 36 36 # if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) 37 # ifdef OPENSSL_UNISTD 38 # include OPENSSL_UNISTD 39 # else 40 # include <unistd.h> 41 # endif 37 # include <unistd.h> 42 38 /* 43 39 * If unistd.h defines _POSIX_VERSION, we conclude that we are on a POSIX … … 93 89 */ 94 90 # elif !defined(OPENSSL_SYS_VMS) \ 95 96 91 && !defined(OPENSSL_SYS_MSDOS) \ 92 && !defined(OPENSSL_SYS_VXWORKS) 97 93 # define TERMIOS 98 94 # undef TERMIO … … 132 128 # endif 133 129 134 # if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) 130 # if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && ! (defined(OPENSSL_SYS_TANDEM) && defined(_SPT_MODEL_)) 135 131 # include <sys/ioctl.h> 136 132 # endif … … 377 373 static int open_console(UI *ui) 378 374 { 379 CRYPTO_THREAD_write_lock(ui->lock); 375 if (!CRYPTO_THREAD_write_lock(ui->lock)) 376 return 0; 380 377 is_a_tty = 1; 381 378 … … 456 453 */ 457 454 if (errno == ENODEV) 458 is_a_tty = 0;455 is_a_tty = 0; 459 456 else 460 457 # endif 461 458 { 462 char tmp_num[10]; 463 BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%d", errno); 464 UIerr(UI_F_OPEN_CONSOLE, UI_R_UNKNOWN_TTYGET_ERRNO_VALUE); 465 ERR_add_error_data(2, "errno=", tmp_num); 466 459 ERR_raise_data(ERR_LIB_UI, UI_R_UNKNOWN_TTYGET_ERRNO_VALUE, 460 "errno=%d", errno); 467 461 return 0; 468 462 } … … 474 468 /* if there isn't a TT device, something is very wrong */ 475 469 if (status != SS$_NORMAL) { 476 char tmp_num[12]; 477 478 BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%%X%08X", status); 479 UIerr(UI_F_OPEN_CONSOLE, UI_R_SYSASSIGN_ERROR); 480 ERR_add_error_data(2, "status=", tmp_num); 470 ERR_raise_data(ERR_LIB_UI, UI_R_SYSASSIGN_ERROR, 471 "status=%%X%08X", status); 481 472 return 0; 482 473 } … … 511 502 0, 0, 0, 0); 512 503 if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) { 513 char tmp_num[2][12]; 514 515 BIO_snprintf(tmp_num[0], sizeof(tmp_num[0]) - 1, "%%X%08X", 516 status); 517 BIO_snprintf(tmp_num[1], sizeof(tmp_num[1]) - 1, "%%X%08X", 518 iosb.iosb$w_value); 519 UIerr(UI_F_NOECHO_CONSOLE, UI_R_SYSQIOW_ERROR); 520 ERR_add_error_data(5, "status=", tmp_num[0], 521 ",", "iosb.iosb$w_value=", tmp_num[1]); 504 ERR_raise_data(ERR_LIB_UI, UI_R_SYSQIOW_ERROR, 505 "status=%%X%08X, iosb.iosb$w_value=%%X%08X", 506 status, iosb.iosb$w_value); 522 507 return 0; 523 508 } … … 549 534 0, 0, 0, 0); 550 535 if ((status != SS$_NORMAL) || (iosb.iosb$w_value != SS$_NORMAL)) { 551 char tmp_num[2][12]; 552 553 BIO_snprintf(tmp_num[0], sizeof(tmp_num[0]) - 1, "%%X%08X", 554 status); 555 BIO_snprintf(tmp_num[1], sizeof(tmp_num[1]) - 1, "%%X%08X", 556 iosb.iosb$w_value); 557 UIerr(UI_F_ECHO_CONSOLE, UI_R_SYSQIOW_ERROR); 558 ERR_add_error_data(5, "status=", tmp_num[0], 559 ",", "iosb.iosb$w_value=", tmp_num[1]); 536 ERR_raise_data(ERR_LIB_UI, UI_R_SYSQIOW_ERROR, 537 "status=%%X%08X, iosb.iosb$w_value=%%X%08X", 538 status, iosb.iosb$w_value); 560 539 return 0; 561 540 } … … 580 559 status = sys$dassgn(channel); 581 560 if (status != SS$_NORMAL) { 582 char tmp_num[12]; 583 584 BIO_snprintf(tmp_num, sizeof(tmp_num) - 1, "%%X%08X", status); 585 UIerr(UI_F_CLOSE_CONSOLE, UI_R_SYSDASSGN_ERROR); 586 ERR_add_error_data(2, "status=", tmp_num); 561 ERR_raise_data(ERR_LIB_UI, UI_R_SYSDASSGN_ERROR, 562 "status=%%X%08X", status); 587 563 return 0; 588 564 } -
trunk/src/libs/openssl-3.0.1/crypto/ui/ui_util.c
r91772 r94082 1 1 /* 2 * Copyright 2002-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 72 72 73 73 static int ui_dup_method_data(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, 74 void * from_d, int idx, long argl, void *argp)74 void **pptr, int idx, long argl, void *argp) 75 75 { 76 void **pptr = (void **)from_d;77 76 if (*pptr != NULL) 78 77 *pptr = OPENSSL_memdup(*pptr, sizeof(struct pem_password_cb_data));
Note:
See TracChangeset
for help on using the changeset viewer.