From cb4e15c1aecbe283b87e4e97c1d485062ef7f571 Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 21 Apr 2017 01:24:56 +0100 Subject: Added SASL authentication support Added SASL support to OpenSSL --- client_examples/ppmtest.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'client_examples/ppmtest.c') diff --git a/client_examples/ppmtest.c b/client_examples/ppmtest.c index b8602f0..eeafc22 100644 --- a/client_examples/ppmtest.c +++ b/client_examples/ppmtest.c @@ -58,12 +58,25 @@ static void SaveFramebufferAsPPM(rfbClient* client, int x, int y, int w, int h) fclose(f); } +char * getuser(rfbClient *client) +{ +return strdup("testuser@test"); +} + +char * getpassword(rfbClient *client) +{ +return strdup("Password"); +} + int main(int argc, char **argv) { rfbClient* client = rfbGetClient(8,3,4); time_t t=time(NULL); + client->GetUser = getuser; + client->GetPassword = getpassword; + if(argc>1 && !strcmp("-print",argv[1])) { client->GotFrameBufferUpdate = PrintRect; argv[1]=argv[0]; argv++; argc--; -- cgit v1.2.3 From 666f37efc08c20fa37b6a8ca5967b066118f56aa Mon Sep 17 00:00:00 2001 From: Christian Beier Date: Sat, 2 Sep 2017 17:19:38 +0200 Subject: Fix building whithout SASL --- client_examples/ppmtest.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'client_examples/ppmtest.c') diff --git a/client_examples/ppmtest.c b/client_examples/ppmtest.c index eeafc22..99ee595 100644 --- a/client_examples/ppmtest.c +++ b/client_examples/ppmtest.c @@ -74,8 +74,10 @@ main(int argc, char **argv) rfbClient* client = rfbGetClient(8,3,4); time_t t=time(NULL); +#ifdef LIBVNCSERVER_HAVE_SASL client->GetUser = getuser; client->GetPassword = getpassword; +#endif if(argc>1 && !strcmp("-print",argv[1])) { client->GotFrameBufferUpdate = PrintRect; -- cgit v1.2.3