mirror of
https://github.com/curl/curl.git
synced 2026-08-26 02:43:31 +03:00
new getpass proto and function pointer usage
This commit is contained in:
parent
e05922c428
commit
9f4f16b55d
5 changed files with 55 additions and 9 deletions
|
|
@ -99,7 +99,12 @@ typedef size_t (*curl_read_callback)(char *buffer,
|
|||
size_t nitems,
|
||||
FILE *instream);
|
||||
|
||||
/* All possible error codes from this version of urlget(). Future versions
|
||||
typedef int (*curl_passwd_callback)(void *clientp,
|
||||
char *prompt,
|
||||
char *buffer,
|
||||
int buflen);
|
||||
|
||||
/* All possible error codes from all sorts of curl functions. Future versions
|
||||
may return other values, stay prepared.
|
||||
|
||||
Always add new return codes last. Never *EVER* remove any. The return
|
||||
|
|
@ -166,6 +171,8 @@ typedef enum {
|
|||
|
||||
CURLE_HTTP_PORT_FAILED, /* HTTP Interface operation failed */
|
||||
|
||||
CURLE_BAD_PASSWORD_ENTERED, /* when the my_getpass() returns fail */
|
||||
|
||||
CURL_LAST
|
||||
} CURLcode;
|
||||
|
||||
|
|
@ -404,6 +411,13 @@ typedef enum {
|
|||
this option is used only if SSL_VERIFYPEER is true */
|
||||
CINIT(CAINFO, OBJECTPOINT, 65),
|
||||
|
||||
/* Function pointer to replace the internal password prompt */
|
||||
CINIT(PASSWDFUNCTION, FUNCTIONPOINT, 66),
|
||||
|
||||
/* Custom pointer that gets passed as first argument to the password
|
||||
function */
|
||||
CINIT(PASSWDDATA, OBJECTPOINT, 67),
|
||||
|
||||
CURLOPT_LASTENTRY /* the last unusued */
|
||||
} CURLoption;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue