Giter Site home page Giter Site logo

Comments (3)

jcflack avatar jcflack commented on July 30, 2024

I've reported closely-related issue csirtgadgets/LWPx-ParanoidAgent#14 (it breaks because it passes PeerHost to this module expecting it to work).

Naturally, the problem interaction could be fixed either by having that module pass SSL_hostname explicitly, or having this module not ignore PeerHost. I've opened issues both places because I think both changes would make sense.

from p5-io-socket-ssl.

noxxi avatar noxxi commented on July 30, 2024

IO::Socket::SSL uses IO::Socket::INET, IO::Socket::INET6 or IO::Socket::IP as the backend and unfortunately these modules differ slightly in the use of these keys:

  • INET and INET6 claim that PeerHost is just a synonym for PeerAddr and will set PeerAddr from PeerHost only if PeerAddr is not defined.
  • IP claims instead that PeerAddr is a synonym for PeerHost and will set PeerHost from PeerAddr only if PeerHost is not defined. Thus it behaves different to the others.

But, both say that PeerAddr and PeerHost are just a different name for the same thing and both ignore if you give different settings to both values (but they ignore it in a different way).

Internally INET and INET6 leave PeerHost in args, even after they've used it to set PeerAddr. IP instead removes PeerAddr if it got used to set PeerHost. In essence it should not matter if one uses PeerAddr||PeerHost or PeerHost||PeerAddr because these keys should be either the same (because they are synonyms) or one of them should be empty. But if the keys are set to different values the behavior depends on the underlying module.

In essence the only sane behavior would be to croak if both keys are set and are different.

There are some places in IO::Socket::SSL which currently only use PeerAddr. These places need to be fixed to use PeerAddr||PeerHost to work together with IO::Socket::IP too.

from p5-io-socket-ssl.

noxxi avatar noxxi commented on July 30, 2024

There are some places in IO::Socket::SSL which currently only use PeerAddr. These places need to be fixed to use PeerAddr||PeerHost to work together with IO::Socket::IP too.

This was fixed in 68b1ba1, additionally to also accepting PeerService (used by IO::Socket::IP) instead of PeerPort. Also it was documented that PeerHost and PeerAddr are considered synonyms and thus should never be set both or at least not to different values.

from p5-io-socket-ssl.

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.