Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self signed cert not supported #185

Open
david-strejc opened this issue May 4, 2022 · 4 comments
Open

Self signed cert not supported #185

david-strejc opened this issue May 4, 2022 · 4 comments

Comments

@david-strejc
Copy link

At line:

61 private function prepareSocketOptions(): array

in src/Protocol/ProtocolTrait.php

there is no way to set:

'allow_self_signed' => true,

And this means there is no way to support self signed certs.

Is there a way how to implement this?

@Slamdunk
Copy link
Contributor

Slamdunk commented May 4, 2022

Have a look at

public function setNoValidateCert(bool $novalidatecert)

@froschdesign
Copy link
Member

See also in the documentation:

If you are connecting to a mail server with a self-signed certificate and want to skip the SSL verification, you can also pass an additional argument novalidatecert with the value true.

https://docs.laminas.dev/laminas-mail/read/#using-remote-storage-protocols

@david-strejc
Copy link
Author

Have a look at

public function setNoValidateCert(bool $novalidatecert)

Yes this is of course true but there is missing:

'allow_self_signed' => true,

This line here:

private function prepareSocketOptions(): array { return $this->novalidatecert ? [ 'ssl' => [ 'verify_peer_name' => false, 'verify_peer' => false, ], ] : []; }

@froschdesign
Copy link
Member

Ah, it's a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants