I get the following exception while using the scribe OAuth library.
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
Based on some googling it seems I should set up the JVM truststore somehow.
Why do I need to do this? How can I instruct the Java VM to use the default truststore of the os? (Mac OS X in my case).
You can use the Apple JCA Provider to use the OSX keychain as the java trust store. Just start the JVM with the following system property:
-Djavax.net.ssl.trustStoreType=KeychainStore
You can set this property for every started JVM using the JAVA_TOOL_OPTIONS
environment variable, as described in hagrawal's answer.