# SSL Error during OAuth2

**URL:** https://meta.discourse.org/t/ssl-error-during-oauth2/135257
**Category:** Self-hosting
**Created:** [December 6, 2019, 12:20pm UTC](https://meta.discourse.org/t/ssl-error-during-oauth2/135257 "2019-12-06T12:20:44Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [December 6, 2019, 12:41pm UTC](https://meta.discourse.org/t/ssl-error-during-oauth2/135257/2 "2019-12-06T12:41:22Z")

</div>

> [@Wurzelseppi](#):
>
> dh key too small (OpenSSL::SSL::SSLError)

It doesn’t affect email in this case, but the explanation I gave in the topic you linked stays the same. The connection to the OAuth2 server fails because the DH key is too small and therefore considered insecure by OpenSSL.

You can apply the following temporary workaround, but increasing the DH key size on the OAuth2 server is the only solution.

> [@Email SSL Errors after Update to 2.4.0.beta4](https://meta.discourse.org/t/email-ssl-errors-after-update-to-2-4-0-beta4/128992/11):
>
> As a workaround, you should be able to edit `/etc/ssl/openssl.cnf` and remove the `CipherString = DEFAULT@SECLEVEL=2` at the end of the file. Sidekiq should pick up the new OpenSSL settings after restarting the container.

---

_[View the full topic](https://meta.discourse.org/t/ssl-error-during-oauth2/135257)._
