Add temporary api function to enable auth without tls
parent
727fd785c6
commit
0199d87368
|
@ -154,10 +154,17 @@ void nvnc_set_client_cleanup_fn(struct nvnc_client* self, nvnc_client_fn fn);
|
||||||
void nvnc_set_cut_text_fn(struct nvnc*, nvnc_cut_text_fn fn);
|
void nvnc_set_cut_text_fn(struct nvnc*, nvnc_cut_text_fn fn);
|
||||||
void nvnc_set_desktop_layout_fn(struct nvnc* self, nvnc_desktop_layout_fn);
|
void nvnc_set_desktop_layout_fn(struct nvnc* self, nvnc_desktop_layout_fn);
|
||||||
|
|
||||||
|
/* TODO: Changes this interface so that we have enable_auth(auth_fn),
|
||||||
|
* set_tls_creds(key, cert), and has_tls() -> bool
|
||||||
|
*/
|
||||||
|
|
||||||
bool nvnc_has_auth(void);
|
bool nvnc_has_auth(void);
|
||||||
|
|
||||||
int nvnc_enable_auth(struct nvnc* self, const char* privkey_path,
|
int nvnc_enable_auth(struct nvnc* self, const char* privkey_path,
|
||||||
const char* cert_path, nvnc_auth_fn, void* userdata);
|
const char* cert_path, nvnc_auth_fn, void* userdata);
|
||||||
|
|
||||||
|
int nvnc_enable_auth2(struct nvnc* self, nvnc_auth_fn, void* userdata);
|
||||||
|
|
||||||
struct nvnc_fb* nvnc_fb_new(uint16_t width, uint16_t height,
|
struct nvnc_fb* nvnc_fb_new(uint16_t width, uint16_t height,
|
||||||
uint32_t fourcc_format, uint16_t stride);
|
uint32_t fourcc_format, uint16_t stride);
|
||||||
struct nvnc_fb* nvnc_fb_from_buffer(void* buffer, uint16_t width,
|
struct nvnc_fb* nvnc_fb_from_buffer(void* buffer, uint16_t width,
|
||||||
|
|
10
src/server.c
10
src/server.c
|
@ -2326,6 +2326,16 @@ cert_alloc_failure:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EXPORT
|
||||||
|
int nvnc_enable_auth2(struct nvnc* self, nvnc_auth_fn auth_fn, void* userdata)
|
||||||
|
{
|
||||||
|
#ifdef HAVE_CRYPTO
|
||||||
|
self->auth_fn = auth_fn;
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
EXPORT
|
EXPORT
|
||||||
void nvnc_set_cursor(struct nvnc* self, struct nvnc_fb* fb, uint16_t width,
|
void nvnc_set_cursor(struct nvnc* self, struct nvnc_fb* fb, uint16_t width,
|
||||||
uint16_t height, uint16_t hotspot_x, uint16_t hotspot_y,
|
uint16_t height, uint16_t hotspot_x, uint16_t hotspot_y,
|
||||||
|
|
Loading…
Reference in New Issue