Fix 403 apk v3 signatures#645
Merged
Merged
Conversation
g-k
force-pushed
the
fix-403-apk-v3-signatures
branch
from
March 23, 2021 19:56
8b262cb to
4ca11f2
Compare
Pull Request Test Coverage Report for Build 5960
💛 - Coveralls |
g-k
marked this pull request as ready for review
March 23, 2021 20:59
g-k
commented
Mar 23, 2021
| defer os.Remove(tmpAPKFile.Name()) | ||
| ioutil.WriteFile(tmpAPKFile.Name(), file, 0755) | ||
|
|
||
| apkSigCmd := exec.Command("java", "-jar", "/usr/bin/apksigner", "sign", |
Contributor
Author
There was a problem hiding this comment.
/usr/bin/apksigner is a shell script. No idea why we were calling it as a jar file before.
g-k
force-pushed
the
fix-403-apk-v3-signatures
branch
8 times, most recently
from
April 5, 2021 14:41
677b78b to
9a04b42
Compare
g-k
commented
Apr 5, 2021
| ) | ||
|
|
||
| func assertNewSignerWithConfOK(t *testing.T, conf signer.Configuration) *APK2Signer { | ||
| s, err := New(apk2signerconf) |
Contributor
Author
There was a problem hiding this comment.
This was a bug with the old test code.
g-k
commented
Apr 5, 2021
| args = append(args, "--v3-signing-enabled", "true") | ||
| } else { | ||
| // apksigner signs with v3 if the minsdk version supports it | ||
| args = append(args, "--v3-signing-enabled", "false") |
Contributor
Author
There was a problem hiding this comment.
Have to explicitly disable v3 signing after upgrading apksigner
Contributor
Author
|
Got feedback from Aki that the mobile team would like to enable v3 sigs gradually, so autograph needs to support signing with and without v3 sigs. I added a I didn't add unit tests, since the signer doesn't have them and it'd require a larger change to have it take a mocked or dummy filesystem or r? @ajvb |
g-k
force-pushed
the
fix-403-apk-v3-signatures
branch
from
April 5, 2021 21:24
9a04b42 to
010ca53
Compare
added 8 commits
April 6, 2021 09:11
apksigner is a shell script
The input file is not signed, so it's not a resigning: apksigner verify signer/apk/aligned-two-files.apk DOES NOT VERIFY ERROR: Missing META-INF/MANIFEST.MF
g-k
force-pushed
the
fix-403-apk-v3-signatures
branch
from
April 6, 2021 13:14
010ca53 to
60ba5d4
Compare
Contributor
Author
|
Thanks AJ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: #403
refs: https://jira.mozilla.com/browse/RELENG-9
Functional Tests:
apk2_test.goto fail artificially and confirm verify output includes v3 format verificationr? @ajvb
NB: I'm going to hold off on landing this until I get the go ahead from RelEng and Mobile