DTLSv1_Listen failed












0















I'm currently writing a DTLS server. I encountered a problem with DTLSv1_Listen that fails with error code SSL_ERROR_SSL.



The handshake sequence is the following :
Client Hello
Content Type: Handshake (22)
Version: DTLS 1.2 (0xfefd)
Epoch: 0
Sequence Number: 0
Length: 145
Handshake Protocol: Client Hello
Handshake Type: Client Hello (1)
Length: 133
Message Sequence: 0
Fragment Offset: 0
Fragment Length: 133
Version: DTLS 1.2 (0xfefd)
Random: 10a0b17d31c7b374d08d51f3fdd3e6b5ecb13658a9e554a3...
Session ID Length: 0
Cookie Length: 0
Cipher Suites Length: 6
Cipher Suites (3 suites)
Compression Methods Length: 1
Compression Methods (1 method)
Extensions Length: 85
Extension: ec_point_formats (len=4)
Extension: supported_groups (len=28)
Extension: SessionTicket TLS (len=0)
Extension: signature_algorithms (len=32)
Extension: heartbeat (len=1)



Hello Verify Request
Content Type: Handshake (22)
Version: DTLS 1.2 (0xfefd)
Epoch: 0
Sequence Number: 0
Length: 35
Handshake Protocol: Hello Verify Request
Handshake Type: Hello Verify Request (3)
Length: 23
Message Sequence: 0
Fragment Offset: 0
Fragment Length: 23
Version: DTLS 1.0 (0xfeff)
Cookie Length: 20
Cookie: c4994e593cd77b26208a374cde0b48372a1636db



DTLSv1.2 Record Layer: Alert (Level: Fatal, Description: Handshake Failure)
Content Type: Alert (21)
Version: DTLS 1.2 (0xfefd)
Epoch: 0
Sequence Number: 1
Length: 2
Alert Message



My ssl context is initialized that way :



 SSL_library_init ();
SSL_load_error_strings ();
ERR_load_BIO_strings();
OpenSSL_add_all_algorithms();

pServerContext = SSL_CTX_new(DTLSv1_2_server_method());

if (SSL_CTX_set_cipher_list(pServerContext, "ALL") != 1)
{
getLogger()->error("DTLS : unable to load ciphers, exitingn");
exit(1);
}


[... set certificates, key, etc...]



The cookie returned is correct, and i don't see what is wrong. The only strange point is the Version: DTLS 1.0 sent in the verify request (strange because i initialized with DTLSv1_2_server_method).
Is there an explanation of why it fails?



Thanks for any input!










share|improve this question



























    0















    I'm currently writing a DTLS server. I encountered a problem with DTLSv1_Listen that fails with error code SSL_ERROR_SSL.



    The handshake sequence is the following :
    Client Hello
    Content Type: Handshake (22)
    Version: DTLS 1.2 (0xfefd)
    Epoch: 0
    Sequence Number: 0
    Length: 145
    Handshake Protocol: Client Hello
    Handshake Type: Client Hello (1)
    Length: 133
    Message Sequence: 0
    Fragment Offset: 0
    Fragment Length: 133
    Version: DTLS 1.2 (0xfefd)
    Random: 10a0b17d31c7b374d08d51f3fdd3e6b5ecb13658a9e554a3...
    Session ID Length: 0
    Cookie Length: 0
    Cipher Suites Length: 6
    Cipher Suites (3 suites)
    Compression Methods Length: 1
    Compression Methods (1 method)
    Extensions Length: 85
    Extension: ec_point_formats (len=4)
    Extension: supported_groups (len=28)
    Extension: SessionTicket TLS (len=0)
    Extension: signature_algorithms (len=32)
    Extension: heartbeat (len=1)



    Hello Verify Request
    Content Type: Handshake (22)
    Version: DTLS 1.2 (0xfefd)
    Epoch: 0
    Sequence Number: 0
    Length: 35
    Handshake Protocol: Hello Verify Request
    Handshake Type: Hello Verify Request (3)
    Length: 23
    Message Sequence: 0
    Fragment Offset: 0
    Fragment Length: 23
    Version: DTLS 1.0 (0xfeff)
    Cookie Length: 20
    Cookie: c4994e593cd77b26208a374cde0b48372a1636db



    DTLSv1.2 Record Layer: Alert (Level: Fatal, Description: Handshake Failure)
    Content Type: Alert (21)
    Version: DTLS 1.2 (0xfefd)
    Epoch: 0
    Sequence Number: 1
    Length: 2
    Alert Message



    My ssl context is initialized that way :



     SSL_library_init ();
    SSL_load_error_strings ();
    ERR_load_BIO_strings();
    OpenSSL_add_all_algorithms();

    pServerContext = SSL_CTX_new(DTLSv1_2_server_method());

    if (SSL_CTX_set_cipher_list(pServerContext, "ALL") != 1)
    {
    getLogger()->error("DTLS : unable to load ciphers, exitingn");
    exit(1);
    }


    [... set certificates, key, etc...]



    The cookie returned is correct, and i don't see what is wrong. The only strange point is the Version: DTLS 1.0 sent in the verify request (strange because i initialized with DTLSv1_2_server_method).
    Is there an explanation of why it fails?



    Thanks for any input!










    share|improve this question

























      0












      0








      0








      I'm currently writing a DTLS server. I encountered a problem with DTLSv1_Listen that fails with error code SSL_ERROR_SSL.



      The handshake sequence is the following :
      Client Hello
      Content Type: Handshake (22)
      Version: DTLS 1.2 (0xfefd)
      Epoch: 0
      Sequence Number: 0
      Length: 145
      Handshake Protocol: Client Hello
      Handshake Type: Client Hello (1)
      Length: 133
      Message Sequence: 0
      Fragment Offset: 0
      Fragment Length: 133
      Version: DTLS 1.2 (0xfefd)
      Random: 10a0b17d31c7b374d08d51f3fdd3e6b5ecb13658a9e554a3...
      Session ID Length: 0
      Cookie Length: 0
      Cipher Suites Length: 6
      Cipher Suites (3 suites)
      Compression Methods Length: 1
      Compression Methods (1 method)
      Extensions Length: 85
      Extension: ec_point_formats (len=4)
      Extension: supported_groups (len=28)
      Extension: SessionTicket TLS (len=0)
      Extension: signature_algorithms (len=32)
      Extension: heartbeat (len=1)



      Hello Verify Request
      Content Type: Handshake (22)
      Version: DTLS 1.2 (0xfefd)
      Epoch: 0
      Sequence Number: 0
      Length: 35
      Handshake Protocol: Hello Verify Request
      Handshake Type: Hello Verify Request (3)
      Length: 23
      Message Sequence: 0
      Fragment Offset: 0
      Fragment Length: 23
      Version: DTLS 1.0 (0xfeff)
      Cookie Length: 20
      Cookie: c4994e593cd77b26208a374cde0b48372a1636db



      DTLSv1.2 Record Layer: Alert (Level: Fatal, Description: Handshake Failure)
      Content Type: Alert (21)
      Version: DTLS 1.2 (0xfefd)
      Epoch: 0
      Sequence Number: 1
      Length: 2
      Alert Message



      My ssl context is initialized that way :



       SSL_library_init ();
      SSL_load_error_strings ();
      ERR_load_BIO_strings();
      OpenSSL_add_all_algorithms();

      pServerContext = SSL_CTX_new(DTLSv1_2_server_method());

      if (SSL_CTX_set_cipher_list(pServerContext, "ALL") != 1)
      {
      getLogger()->error("DTLS : unable to load ciphers, exitingn");
      exit(1);
      }


      [... set certificates, key, etc...]



      The cookie returned is correct, and i don't see what is wrong. The only strange point is the Version: DTLS 1.0 sent in the verify request (strange because i initialized with DTLSv1_2_server_method).
      Is there an explanation of why it fails?



      Thanks for any input!










      share|improve this question














      I'm currently writing a DTLS server. I encountered a problem with DTLSv1_Listen that fails with error code SSL_ERROR_SSL.



      The handshake sequence is the following :
      Client Hello
      Content Type: Handshake (22)
      Version: DTLS 1.2 (0xfefd)
      Epoch: 0
      Sequence Number: 0
      Length: 145
      Handshake Protocol: Client Hello
      Handshake Type: Client Hello (1)
      Length: 133
      Message Sequence: 0
      Fragment Offset: 0
      Fragment Length: 133
      Version: DTLS 1.2 (0xfefd)
      Random: 10a0b17d31c7b374d08d51f3fdd3e6b5ecb13658a9e554a3...
      Session ID Length: 0
      Cookie Length: 0
      Cipher Suites Length: 6
      Cipher Suites (3 suites)
      Compression Methods Length: 1
      Compression Methods (1 method)
      Extensions Length: 85
      Extension: ec_point_formats (len=4)
      Extension: supported_groups (len=28)
      Extension: SessionTicket TLS (len=0)
      Extension: signature_algorithms (len=32)
      Extension: heartbeat (len=1)



      Hello Verify Request
      Content Type: Handshake (22)
      Version: DTLS 1.2 (0xfefd)
      Epoch: 0
      Sequence Number: 0
      Length: 35
      Handshake Protocol: Hello Verify Request
      Handshake Type: Hello Verify Request (3)
      Length: 23
      Message Sequence: 0
      Fragment Offset: 0
      Fragment Length: 23
      Version: DTLS 1.0 (0xfeff)
      Cookie Length: 20
      Cookie: c4994e593cd77b26208a374cde0b48372a1636db



      DTLSv1.2 Record Layer: Alert (Level: Fatal, Description: Handshake Failure)
      Content Type: Alert (21)
      Version: DTLS 1.2 (0xfefd)
      Epoch: 0
      Sequence Number: 1
      Length: 2
      Alert Message



      My ssl context is initialized that way :



       SSL_library_init ();
      SSL_load_error_strings ();
      ERR_load_BIO_strings();
      OpenSSL_add_all_algorithms();

      pServerContext = SSL_CTX_new(DTLSv1_2_server_method());

      if (SSL_CTX_set_cipher_list(pServerContext, "ALL") != 1)
      {
      getLogger()->error("DTLS : unable to load ciphers, exitingn");
      exit(1);
      }


      [... set certificates, key, etc...]



      The cookie returned is correct, and i don't see what is wrong. The only strange point is the Version: DTLS 1.0 sent in the verify request (strange because i initialized with DTLSv1_2_server_method).
      Is there an explanation of why it fails?



      Thanks for any input!







      openssl dtls






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 3 at 10:25









      Christian CayeuxChristian Cayeux

      11




      11
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54020389%2fdtlsv1-listen-failed%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54020389%2fdtlsv1-listen-failed%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas