Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SecureConnector: add optional TlsPeer, this...#252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Thomas-Gelf wants to merge1 commit intoreactphp:1.x
base:1.x
Choose a base branch
Loading
fromThomas-Gelf:feature/capture-peer-cert

Conversation

@Thomas-Gelf
Copy link

...allows to capture your peer certificate and/or it's chain

@Thomas-Gelf
Copy link
Author

After various approaches, this seemed to be the most promising one. However, please let me know in case you want to move it elsewhere.

Just in case you're wondering, I also tried to combine this with theBrowser, which was pretty tricky. First I applied some getters to various connectors, allowing me to dig a hole down through all those nested Connectors. But then I finally settled with a newConnectedConnector, allowing me to first connect, get theConnection-instance, retrieve the certificate - and then pass on the already connected/established connection to theBrowser:

<?phpfinalclass ConnectedConnectorimplements ConnectorInterface{private$connection;publicfunction__construct(ConnectionInterface$connection)    {$this->connection =$connection;    }publicfunctionconnect($uri)    {returnresolve($this->connection);    }}

@Thomas-Gelf
Copy link
Author

NB: Checks are failing, but for an unrelated reason

@Thomas-GelfThomas-Gelfforce-pushed thefeature/capture-peer-cert branch 2 times, most recently from313ca21 to64792e5CompareSeptember 25, 2020 13:22
@WyriHaximusWyriHaximus added this to thev1.7.0 milestoneSep 27, 2020
Copy link
Member

@WyriHaximusWyriHaximus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Cool! Thank you for putting the works into this PR 👍 .

P.S. What is your use case for doing this?

@Thomas-Gelf
Copy link
Author

Thomas-Gelf commentedSep 27, 2020
edited
Loading

@WyriHaximus: glad that you like it! Use case: different ones. Right now I'm using it for an upcomingIcinga module where I want to ask the user to confirm whether he wants to add an unknown CA certificate to it's trust store. Once the CA is confirmed, the (ReactPHP-based) daemon needs to generate a CSR and to deal with the signing process.

In future I'd love to also use it for already existing components like ourcertificate monitoring

@WyriHaximus
Copy link
Member

@Thomas-Gelf That's pretty amazing! Looking forward to the certificate monitoring component ReactPHP use, feel free to tag me when that comes

...allows to capture your peer certificate and/or it's chain
@clue
Copy link
Member

clue commentedSep 3, 2021

@Thomas-Gelf Thanks for looking into this and filing this PR! Love to see how@reactphp is used as part of@Icinga!

Unfortunately, this PR currently uses the internalConnection API which is not otherwise exposed to the outside at the moment. Do we need to expose this class or can we find a way to somehow expose this using the existing interfaces? I'm also not opposed to expose the underlying stream resource for more direct access, but I still wonder how we could make this work without introducing a BC break.

What are your thoughts on this? I'm also happy to jump on a quick call to discuss this in person if you want (see my profile for details) 👍

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@WyriHaximusWyriHaximusWyriHaximus approved these changes

@clueclueAwaiting requested review from clue

@jsorjsorAwaiting requested review from jsor

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@Thomas-Gelf@WyriHaximus@clue

[8]ページ先頭

©2009-2025 Movatter.jp