Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

Https error in AWS Lambda #141

Open
Open
@PanAeon

Description

@PanAeon

scalaj-http version: 2.3.0
scala version: 2.11

When I try to make vanilla https request in AWS Lambda (Java 8 Runtime) I've got the following error:

invalid key or spec in GCM mode: java.lang.RuntimeException
java.lang.RuntimeException: invalid key or spec in GCM mode
at sun.security.ssl.CipherBox.createExplicitNonce(CipherBox.java:1033)
at sun.security.ssl.OutputRecord.encrypt(OutputRecord.java:248)
at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:869)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:857)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:727)
at sun.security.ssl.SSLSocketImpl.sendAlert(SSLSocketImpl.java:2079)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1953)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1916)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1899)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1420)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at scalaj.http.StringBodyConnectFunc.apply(Http.scala:500)
at scalaj.http.StringBodyConnectFunc.apply(Http.scala:497)
at scalaj.http.HttpRequest.scalaj$http$HttpRequest$$doConnection(Http.scala:355)
at scalaj.http.HttpRequest.exec(Http.scala:335)
at scalaj.http.HttpRequest.asString(Http.scala:455)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
Caused by: java.security.InvalidKeyException: No installed provider supports this key: javax.crypto.spec.SecretKeySpec
at javax.crypto.Cipher.chooseProvider(Cipher.java:893)
at javax.crypto.Cipher.init(Cipher.java:1396)
at sun.security.ssl.CipherBox.createExplicitNonce(CipherBox.java:1029)
... 28 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions