Giter Club home page Giter Club logo

Comments (2)

4a6f656c avatar 4a6f656c commented on July 30, 2024

This is more likely a bug or misconfiguration in the code the that is using libtls - the error is caused by no server name being specified, yet verification is enabled. I believe the code in question is:

https://gitlab.com/alelec/FFmpeg/blob/master/libavformat/tls_libtls.c#L121

And in this case, with a numeric host (192.168.1.5 in your above example), it passes NULL as the server name to tls_connect_cbs, which will cause the server name not specified failure. If the IP address exists in the certificate, then it should be passed through as the server name. Otherwise, the only other option would be to disable name verification for the certificate.

For the record, tls_host_port() is not involved here - it is only called for tls_connect() and tls_connect_servername(). Also, the second colon check is very much necessary.

from openbsd.

chainikdn avatar chainikdn commented on July 30, 2024

Thanks, this's it.
One possible solution:

--- a/libavformat/tls_libtls.c  2018-02-19 18:33:28.485092988 +0300
+++ b/libavformat/tls_libtls.c  2018-02-19 22:23:09.004103503 +0300
@@ -109,7 +109,7 @@
         goto err_config;
     if (c->key_file && tls_config_set_key_file(cfg, c->key_file) == -1)
         goto err_config;
-    if (!c->verify) {
+    if (!c->verify || c->numerichost) {
         tls_config_insecure_noverifycert(cfg);
         tls_config_insecure_noverifyname(cfg);
         tls_config_insecure_noverifytime(cfg);

from openbsd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.