mirror of
https://github.com/libssh2/libssh2.git
synced 2026-10-24 03:48:58 +03:00
libssh2_sign_sk: add LIBSSH2_API attribute, document availability
Based on it having a public man page, it was likely meant to be a public
function. Mark it `LIBSSH2_API` to export it from the DLL on Windows.
Also move its public prototype next to userauth functions, since its
implemented in userauth.c (though not using the namespace).
Follow-up to ed439a29bb #698
Closes #1965
This commit is contained in:
@@ -95,3 +95,7 @@ pass in the PIN, or a function pointer to retrieve the PIN.
|
||||
# RETURN VALUE
|
||||
|
||||
Return 0 on success or negative on failure.
|
||||
|
||||
# AVAILABILITY
|
||||
|
||||
Added in libssh2 1.11.0
|
||||
|
||||
@@ -370,24 +370,6 @@ typedef struct _LIBSSH2_LISTENER LIBSSH2_LISTENER;
|
||||
typedef struct _LIBSSH2_KNOWNHOSTS LIBSSH2_KNOWNHOSTS;
|
||||
typedef struct _LIBSSH2_AGENT LIBSSH2_AGENT;
|
||||
|
||||
/* SK signature callback */
|
||||
typedef struct _LIBSSH2_PRIVKEY_SK {
|
||||
int algorithm;
|
||||
uint8_t flags;
|
||||
const char *application;
|
||||
const unsigned char *key_handle;
|
||||
size_t handle_len;
|
||||
LIBSSH2_USERAUTH_SK_SIGN_FUNC(*sign_callback);
|
||||
void **orig_abstract;
|
||||
} LIBSSH2_PRIVKEY_SK;
|
||||
|
||||
int libssh2_sign_sk(LIBSSH2_SESSION *session,
|
||||
unsigned char **sig,
|
||||
size_t *sig_len,
|
||||
const unsigned char *data,
|
||||
size_t data_len,
|
||||
void **abstract);
|
||||
|
||||
#ifndef LIBSSH2_NO_DEPRECATED
|
||||
typedef struct _LIBSSH2_POLLFD {
|
||||
unsigned char type; /* LIBSSH2_POLLFD_* below */
|
||||
@@ -758,6 +740,22 @@ LIBSSH2_API int libssh2_userauth_publickey_sk(
|
||||
LIBSSH2_USERAUTH_SK_SIGN_FUNC(*sign_callback),
|
||||
void **abstract);
|
||||
|
||||
/* SK signature callback */
|
||||
typedef struct _LIBSSH2_PRIVKEY_SK {
|
||||
int algorithm;
|
||||
uint8_t flags;
|
||||
const char *application;
|
||||
const unsigned char *key_handle;
|
||||
size_t handle_len;
|
||||
LIBSSH2_USERAUTH_SK_SIGN_FUNC(*sign_callback);
|
||||
void **orig_abstract;
|
||||
} LIBSSH2_PRIVKEY_SK;
|
||||
|
||||
LIBSSH2_API int libssh2_sign_sk(LIBSSH2_SESSION *session,
|
||||
unsigned char **sig, size_t *sig_len,
|
||||
const unsigned char *data, size_t data_len,
|
||||
void **abstract);
|
||||
|
||||
#ifndef LIBSSH2_NO_DEPRECATED
|
||||
LIBSSH2_DEPRECATED(1.2.0, "Use system poll() or select()")
|
||||
LIBSSH2_API int libssh2_poll(LIBSSH2_POLLFD *fds, unsigned int nfds,
|
||||
|
||||
@@ -931,6 +931,7 @@ static int sign_fromfile(LIBSSH2_SESSION *session,
|
||||
return 0;
|
||||
}
|
||||
|
||||
LIBSSH2_API
|
||||
int libssh2_sign_sk(LIBSSH2_SESSION *session,
|
||||
unsigned char **sig, size_t *sig_len,
|
||||
const unsigned char *data, size_t data_len,
|
||||
|
||||
Reference in New Issue
Block a user