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

@chingor13 chingor13 commented Mar 2, 2021

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 as a code owner Mar 2, 2021
@google-cla google-cla bot added the cla: yes label Mar 2, 2021
Copy link
Collaborator

@elharo elharo left a comment

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

@chingor13
Copy link
Collaborator Author

@chingor13 chingor13 commented Mar 2, 2021

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
Collaborator

@elharo elharo left a comment

Kokoro fails on java 7, look related

@chingor13
Copy link
Collaborator Author

@chingor13 chingor13 commented Mar 2, 2021

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 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.

elharo
elharo approved these changes Mar 3, 2021
@chingor13 chingor13 merged commit 83f3702 into googleapis:master Mar 10, 2021
16 of 18 checks passed
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this issue 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 issue 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 issue 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants