diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-11-15 15:48:19 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-11-15 15:50:09 +0100 |
commit | 095a01b70c995fdf77df27aa2a833017336d7e0c (patch) | |
tree | 803955199ab6617b81e5d5afd8f3d2f91bde9e1e /src/options.c | |
parent | 503c729bb05948f1f15aefc8293178792d04b59f (diff) | |
download | libssh-095a01b70c995fdf77df27aa2a833017336d7e0c.tar.gz libssh-095a01b70c995fdf77df27aa2a833017336d7e0c.tar.xz libssh-095a01b70c995fdf77df27aa2a833017336d7e0c.zip |
options: Add SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY option.
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/options.c b/src/options.c index d43e25d..4791e15 100644 --- a/src/options.c +++ b/src/options.c @@ -371,6 +371,10 @@ int ssh_options_set_algo(ssh_session session, int algo, * Set it to specify the GSSAPI server identity that libssh * should expect when connecting to the server (const char *). * + * - SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY + * Set it to specify the GSSAPI client identity that libssh + * should expect when connecting to the server (const char *). + * * @param value The value to set. This is a generic pointer and the * datatype which is used should be set according to the * type set. @@ -810,6 +814,20 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, } } break; + case SSH_OPTIONS_GSSAPI_CLIENT_IDENTITY: + v = value; + if (v == NULL || v[0] == '\0') { + ssh_set_error_invalid(session); + return -1; + } else { + SAFE_FREE(session->opts.gss_client_identity); + session->opts.gss_client_identity = strdup(v); + if (session->opts.gss_client_identity == NULL) { + ssh_set_error_oom(session); + return -1; + } + } + break; default: ssh_set_error(session, SSH_REQUEST_DENIED, "Unknown ssh option %d", type); return -1; |