Skip to content

Fix for java.security.SignatureException: Signature length not correct - #946

Closed
davidpaniz wants to merge 1 commit into
googleapis:devfrom
davidpaniz:dev
Closed

Fix for java.security.SignatureException: Signature length not correct#946
davidpaniz wants to merge 1 commit into
googleapis:devfrom
davidpaniz:dev

Conversation

@davidpaniz

Copy link
Copy Markdown

Since a few hour ago, oath integration with google is not working because a exception java.security.SignatureException: Signature length not correct: got 256 but was expecting 128

This solution is based on this comment http://stackoverflow.com/questions/30780407/google-oauth2-jwt-token-verification-exception
If a exception is thrown while checking keys, it returns false instead of break.

@aaronharnly

Copy link
Copy Markdown

@davidpaniz if you haven't, it looks like you need to follow https://developers.google.com/api-client-library/java/google-api-java-client/contribute

@davidpaniz

Copy link
Copy Markdown
Author

Hi @aaronharnly,

I really skipped all the steps, sorry about that. This PR fixes #947, I did it in a rush to solve a production issue and thought it might be helpful to you. Maybe you can just close this PR and use the main ideia to solve the issue. In the meantime I will follow the steps to contribute to the project.

@ejona86

ejona86 commented Jun 12, 2015

Copy link
Copy Markdown
Contributor

We'll be putting a try-catch around google-http-client's SecurityUtils.verify to fix the issue in the future.

@ejona86 ejona86 closed this Jun 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants