| 1514 | } |
| 1515 | |
| 1516 | char *Item_func_password:: |
| 1517 | create_password_hash_buffer(THD *thd, const char *password, size_t pass_len) |
| 1518 | { |
| 1519 | char *buff= NULL; |
| 1520 | if (thd->variables.old_passwords == 0) |
| 1521 | { |
| 1522 | /* Allocate memory for the password scramble and one extra byte for \0 */ |
| 1523 | buff= (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH + 1); |
| 1524 | my_make_scrambled_password_sha1(buff, password, pass_len); |
| 1525 | } |
| 1526 | #if defined(HAVE_OPENSSL) |
| 1527 | else |
| 1528 | { |
| 1529 | /* Allocate memory for the password scramble and one extra byte for \0 */ |
| 1530 | buff= (char *) thd->alloc(CRYPT_MAX_PASSWORD_SIZE + 1); |
| 1531 | my_make_scrambled_password(buff, password, pass_len); |
| 1532 | } |
| 1533 | #endif |
| 1534 | return buff; |
| 1535 | } |
| 1536 | |
| 1537 | /* Item_func_old_password */ |
| 1538 |
nothing calls this directly
no test coverage detected