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

OAuth2 authentication fails #3

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment
Open

OAuth2 authentication fails #3

GoogleCodeExporter opened this issue Mar 14, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Running the project in eclipse with GetSitesExample as entry
2. Browser window comes up asking for authorisation, which I provide
3. OAuth2 Authentication fails with a debug message

What is the expected output? What do you see instead?
"javax.net.ssl.SSLException: Server key
    at sun.security.ssl.Handshaker.throwSSLException(Handshaker.java:1274)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:223)
    at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
    at sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1016)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:515)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1090)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
    at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:80)
    at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1009)
    at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:299)
    at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:323)
    at com.alfresco.cloud.example.BaseJavaExample.authorize(BaseJavaExample.java:144)
    at com.alfresco.cloud.example.BaseJavaExample.run(BaseJavaExample.java:99)
    at com.alfresco.cloud.example.GetSitesExample.main(GetSitesExample.java:24)
Caused by: java.security.spec.InvalidKeySpecException: Could not create EC 
public key
    at sun.security.pkcs11.P11ECKeyFactory.engineGeneratePublic(P11ECKeyFactory.java:169)
    at java.security.KeyFactory.generatePublic(KeyFactory.java:334)
    at sun.security.ssl.HandshakeMessage$ECDH_ServerKeyExchange.<init>(HandshakeMessage.java:1057)
    at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:218)
    ... 17 more
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: 
CKR_DOMAIN_PARAMS_INVALID
    at sun.security.pkcs11.wrapper.PKCS11.C_CreateObject(Native Method)
    at sun.security.pkcs11.P11ECKeyFactory.generatePublic(P11ECKeyFactory.java:233)
    at sun.security.pkcs11.P11ECKeyFactory.engineGeneratePublic(P11ECKeyFactory.java:164)
    ... 20 more"

Please provide any additional information below.
The line 
"TokenResponse response = 
codeFlow.newTokenRequest(code).setRedirectUri(redirectUri).setScopes(SCOPE).exec
ute();" in BaseJavaExample.java seems to be at fault. I can't figure out what's 
wrong though.

Original issue reported on code.google.com by vsams14 on 19 Aug 2013 at 12:33

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

1 participant