libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protoco


From: Farhan Husain
Subject: Re: [libmicrohttpd] Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.
Date: Mon, 3 Jan 2011 17:33:59 -0600

Hello Christian,

ldd revealed that I am using libmicrohttpd.so.10 and libgnutls.so.26. Here is the complete output:

        linux-vdso.so.1 =>  (0x00007fffe1184000)
        liblog4cxx.so.10 => /usr/local/lib/liblog4cxx.so.10 (0x00007fd1f3b1c000)
        libmicrohttpd.so.10 => /usr/local/lib/libmicrohttpd.so.10 (0x00007fd1f390b000)
        libmysqlpp.so.3 => /usr/lib/libmysqlpp.so.3 (0x00007fd1f36c1000)
        libboost_system.so.1.40.0 => /usr/lib/libboost_system.so.1.40.0 (0x00007fd1f34bd000)
        libboost_filesystem.so.1.40.0 => /usr/lib/libboost_filesystem.so.1.40.0 (0x00007fd1f32a8000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007fd1f2f93000)
        libm.so.6 => /lib/libm.so.6 (0x00007fd1f2d10000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007fd1f2af9000)
        libc.so.6 => /lib/libc.so.6 (0x00007fd1f2775000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x00007fd1f2558000)
        libaprutil-1.so.0 => /usr/local/apr/lib/libaprutil-1.so.0 (0x00007fd1f2336000)
        libexpat.so.1 => /lib/libexpat.so.1 (0x00007fd1f210c000)
        libapr-1.so.0 => /usr/local/apr/lib/libapr-1.so.0 (0x00007fd1f1edd000)
        libgnutls.so.26 => /usr/lib/libgnutls.so.26 (0x00007fd1f1c3b000)
        libgcrypt.so.11 => /lib/libgcrypt.so.11 (0x00007fd1f19c2000)
        libmysqlclient.so.16 => /usr/lib/libmysqlclient.so.16 (0x00007fd1f15b0000)
        librt.so.1 => /lib/librt.so.1 (0x00007fd1f13a8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd1f3f14000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x00007fd1f116e000)
        libdl.so.2 => /lib/libdl.so.2 (0x00007fd1f0f6a000)
        libtasn1.so.3 => /usr/lib/libtasn1.so.3 (0x00007fd1f0d58000)
        libz.so.1 => /lib/libz.so.1 (0x00007fd1f0b41000)
        libgpg-error.so.0 => /lib/libgpg-error.so.0 (0x00007fd1f093d000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x00007fd1f0722000)

Thanks,
Farhan

On Mon, Jan 3, 2011 at 3:03 AM, Christian Grothoff <address@hidden> wrote:
Hi!

Which version of GnuTLS and MHD are you using?  Also, MHD does very little
here for the SSL part, so you might want to check with the GnuTLS developers,
they might know more...

Happy hacking,

Christian

On Saturday 01 January 2011 00:12:11 Farhan Husain wrote:
> Hello,
>
> I am trying to use the SSL support in libmicrohttp. I followed the tutorial
> and the example given here:
> http://www.gnu.org/software/libmicrohttpd/tutorial.html#tlsauthentication_0
> 02ec. However, I am not successful in getting a page from the server. I am
> getting the following errors:
>
> 1. With Chrome: Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol
> error. 2. With Firefox: A blank page
> 3. With curl ("curl -k https://myip:myport/something"): I see some text
> with a lot of garbage (i.e. non-printable ASCII) characters.
>
> Here is the code I am using:
>
>            _daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY |
> MHD_USE_SSL, _port, NULL, NULL, &answerToConnection, this,
>                                 MHD_OPTION_THREAD_POOL_SIZE,
> conf->getWebServiceThreadPoolSize(),
>                                 MHD_OPTION_SOCK_ADDR,
> reinterpret_cast<struct sockaddr *> (&web_service_addr),
>                                 MHD_OPTION_NOTIFY_COMPLETED,
> &requestCompleted, NULL,
>                                 MHD_OPTION_HTTPS_MEM_KEY,
> _keyFileContent.get(),
>                                 MHD_OPTION_HTTPS_MEM_CERT,
> _certFileContent.get(),
>                                 MHD_OPTION_END);
>
> Here is the definition of _keyFileContent and _certFileContent:
>
>         typedef boost::shared_array<char> SharedCharArray_t;
>         SharedCharArray_t _keyFileContent;
>         SharedCharArray_t _certFileContent;
>         _keyFileContent = Utility::loadFile(keyFileName);
>         _certFileContent = Utility::loadFile(certFileName);
>
> I have attached the C++ source file containing the code of
> Utility::loadFile() so that the email does not get too long. Can anyone
> please tell me what I am doing wrong? I printed the contents of the char
> arrays and they look fine except there are some garbage characters at the
> end because I did not terminate the array with a NULL character. I don't
> see the example doing it and that's what I followed. I found a thread in
> the archive talking about the same problem but there was no solution to
> the problem. I would appreciate any kind of help.
>
> Thanks,
> Farhan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]