int SSL_password_prompt()

in native/src/sslutils.c [125:151]


int SSL_password_prompt(tcn_pass_cb_t *data)
{
    int rv = 0;
    data->password[0] = '\0';
#ifdef WIN32
    rv = WIN32_SSL_password_prompt(data);
#else
    EVP_read_pw_string(data->password, SSL_MAX_PASSWORD_LEN,
                       data->prompt, 0);
#endif
    rv = (int)strlen(data->password);
    if (rv > 0) {
        /* Remove LF char if present */
        char *r = strchr(data->password, '\n');
        if (r) {
            *r = '\0';
            rv--;
        }
#ifdef WIN32
        if ((r = strchr(data->password, '\r'))) {
            *r = '\0';
            rv--;
        }
#endif
    }
    return rv;
}