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

fix: re-encode public keys from google.jks into p12 format for android #1738

Merged
merged 1 commit into from Mar 10, 2021

Conversation

chingor13
Copy link
Collaborator

This might fix #1570 - repackage our public keys in google.jks into google.p12.

Repackage command:

keytool -importkeystore -srckeystore google.jks -destkeystore google.p12 -srcstoretype JKS -deststoretype PKCS12 -deststorepass notasecret

@chingor13 chingor13 requested a review from a team as a code owner March 2, 2021 01:06
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 2, 2021
Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did something change in google.p12? Githb shows this as empty?

@chingor13
Copy link
Collaborator Author

did something change in google.p12? Githb shows this as empty?

Perhaps the UI is confused as it's a binary file? When I run ls -l google-api-client/src/main/resources/com/google/api/client/googleapis from a fresh clone, I see the file size as 76476 bytes.

Copy link
Contributor

@elharo elharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kokoro fails on java 7, look related

@chingor13
Copy link
Collaborator Author

Kokoro fails on java 7, look related

Yeah, it's strange because it passes on GitHub actions with Java 7

@suztomo
Copy link
Member

suztomo commented Mar 3, 2021

I just submitted cl/360677807, which would prevent the "Kokoro - Test: Java 7".

junit.framework.AssertionFailedError: expected:<70> but was:<0>
	at com.google.api.client.googleapis.GoogleUtilsTest.testGetCertificateTrustStore(GoogleUtilsTest.java:38)

Feel free to revert cl/360677807 if you still need the Kokoro check.

@chingor13 chingor13 merged commit 83f3702 into googleapis:master Mar 10, 2021
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jul 7, 2021
In FIPS mode loading the `.p12` keystore used by the new SDK version is not supported
because of "PBE AlgorithmParameters not available". Fortunately, the SDK still includes
the old jks trust store so we can just manually load it the same way it was loaded by
the previous version to fix things.
Also, fixed `SocketAccess` to properly rethrow this kind of exception and not run into
a class cast issue.

Closes elastic#75023

relates googleapis/google-api-java-client#1738
original-brownbear added a commit to elastic/elasticsearch that referenced this pull request Jul 7, 2021
In FIPS mode loading the `.p12` keystore used by the new SDK version is not supported
because of "PBE AlgorithmParameters not available". Fortunately, the SDK still includes
the old jks trust store so we can just manually load it the same way it was loaded by
the previous version to fix things.
Also, fixed `SocketAccess` to properly rethrow this kind of exception and not run into
a class cast issue.

Closes #75023

relates googleapis/google-api-java-client#1738
felixbarny pushed a commit to felixbarny/elasticsearch that referenced this pull request Jul 8, 2021
In FIPS mode loading the `.p12` keystore used by the new SDK version is not supported
because of "PBE AlgorithmParameters not available". Fortunately, the SDK still includes
the old jks trust store so we can just manually load it the same way it was loaded by
the previous version to fix things.
Also, fixed `SocketAccess` to properly rethrow this kind of exception and not run into
a class cast issue.

Closes elastic#75023

relates googleapis/google-api-java-client#1738
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GoogleNetHttpTransport errors on Android - results in JKS not found exception
3 participants