Skip to content

Instantly share code, notes, and snippets.

@jvehent
Created December 12, 2018 20:09
Show Gist options
  • Save jvehent/e947fd1e39339a8917af2ad896574c0c to your computer and use it in GitHub Desktop.
Save jvehent/e947fd1e39339a8917af2ad896574c0c to your computer and use it in GitHub Desktop.
diff --git a/signer/apk/apk.go b/signer/apk/apk.go
index 390cec28..adf499e2 100644
--- a/signer/apk/apk.go
+++ b/signer/apk/apk.go
@@ -176,7 +176,7 @@ func (s *APKSigner) signData(sigfile []byte, options interface{}) ([]byte, error
// broken on platforms with API Level < 19
err = toBeSigned.SignWithoutAttr(s.signingCert, s.signingKey, pkcs7.SignerInfoConfig{})
default:
- err = toBeSigned.AddSigner(s.signingCert, s.signingKey, pkcs7.SignerInfoConfig{})
+ err = toBeSigned.SignWithoutAttr(s.signingCert, s.signingKey, pkcs7.SignerInfoConfig{})
}
if err != nil {
return nil, errors.Wrap(err, "apk: cannot sign")
diff --git a/vendor/go.mozilla.org/pkcs7/pkcs7.go b/vendor/go.mozilla.org/pkcs7/pkcs7.go
index 93cec413..04c004c4 100644
--- a/vendor/go.mozilla.org/pkcs7/pkcs7.go
+++ b/vendor/go.mozilla.org/pkcs7/pkcs7.go
@@ -122,7 +122,8 @@ func getOIDForEncryptionAlgorithm(pkey crypto.PrivateKey, OIDDigestAlg asn1.Obje
default:
return OIDEncryptionAlgorithmRSA, nil
case OIDDigestAlg.Equal(OIDDigestAlgorithmSHA1):
- return OIDEncryptionAlgorithmRSASHA1, nil
+ //return OIDEncryptionAlgorithmRSASHA1, nil
+ return OIDEncryptionAlgorithmRSA, nil
case OIDDigestAlg.Equal(OIDDigestAlgorithmSHA256):
return OIDEncryptionAlgorithmRSASHA256, nil
case OIDDigestAlg.Equal(OIDDigestAlgorithmSHA384):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment