# Fixing "Could not generate DH keypair" on RedditLater.com

DevFeed: [Fixing "Could not generate DH keypair" on RedditLater.com](<https://devfeed.tech/articles/fixing-could-not-generate-dh-keypair-on-redditlater-com-32124.md>)

Original publisher: [Read original article](<https://adambard.com/blog/fixing-redditlater/>)

Published: 2013-08-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Adam Bard](<https://devfeed.tech/sources/adam-bard.md>)

Topics: [SSL](<https://devfeed.tech/topics/ssl.md>), [Reddit](<https://devfeed.tech/topics/reddit.md>), [API](<https://devfeed.tech/topics/api.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [exception](<https://devfeed.tech/tags/exception.md>), [reddit](<https://devfeed.tech/tags/reddit.md>), [ssl](<https://devfeed.tech/tags/ssl.md>)

## AI overview

A RedditLater.com application began failing to obtain Reddit access tokens after Reddit improved its API SSL configuration. The article describes a workaround that wraps the default SSLSocketFactory and removes unsupported algorithms, along with a published clj-http-lite snapshot and pull request.

## Source excerpt

RedditLater.com is a little app I made last April. It worked fine until sometime in July, when Reddit released an improvement to its SSL configuration on its api. Thereafter, attempts to get an access token using clj-http-lite began to fail with a javax.net.ssl.SSLException: Could not generate DH keypair exception. Some investigation led me to a stackoverflow post (where else) which led me to this eventual workaround: hack up clj-http-lite to wrap the default SSLSocketFactory in a new class that would remove all the unsupported algorithms from the list of supported ones.