From ae7092a3ad4a71d866cc4137a7e9e20c0b366ca4 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 01/11] Revert "bmt: golint updates for this or self warning (#16628)" This reverts commit 784aa83942e3dbc9bab0385475dbf3755a9892ac. From cdf9d8136189ca3f86a6d73c629994b317eecb26 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 02/11] Revert "travis: use Android NDK 16b (#16562)" This reverts commit fcc18f4c80a5a7e6cc39315fb1eeb2222c811701. From da2df6a0de479a2b8e55ccd52d446318c9e881b6 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 03/11] Revert "event: document select case slice use and add edge case test (#16680)" This reverts commit 53a18d2e2734d078200ec607055ae551245ae74b. From 7f15fa94267170ca179fad4fbf25d146a612d9b2 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 04/11] Revert "all: get rid of error when creating memory database (#16716)" This reverts commit 7beccb29becf439df7bf4c033a94c019ad25bead. From 6dfc14e7497679b4a9cbe94ef7ce31aeb849ba21 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 05/11] Revert "whisper/shhclient: update call to shh_generateSymKeyFromPassword to pass a string (#16668)" This reverts commit 5dbd8b42a90779bd4269012c1336679fd4ca9824. From 7ecf739fcfc11203efa1bd4d35251a7892c6b471 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 06/11] Revert "eth/filter: check nil pointer when unsubscribe (#16682)" This reverts commit 4e7dc34ff1a7469b95eb16f5b4084c26a0ab3662. From 303ac420806e824fcf8cd767298f2a44406ea1cb Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 07/11] Revert "eth: golint fixes to variable names (#16711)" This reverts commit 4747aad160ed3721a70a133105c474cb3b66519e. From 626eb376b64062c5c930e23702f57c08b3586d33 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 08/11] Revert "cmd: various golint fixes (#16700)" This reverts commit 4ea493e7eb9fa3b3695a22487de2605e8da1d2fa. From 860fa70e03c7dcb19604f08e8f45dea74b8f279d Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 09/11] Revert "p2p: don't discard reason set by Disconnect (#16559)" This reverts commit c60f6f62147048f80a0e092b483318af88b5d78b. From 311da826da202c6f419f35f5d9e9b6832fac4da9 Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 10/11] Revert "crypto: fix golint warnings (#16710)" This reverts commit ba975dc0931b9f2962b2f163675772458ed339fd. From ec48ab1848d63c79c1f70a6caac32f76b76f310b Mon Sep 17 00:00:00 2001 From: Amorn Kingthong <37975261+Amorn-Kingthong@users.noreply.github.com> Date: Thu, 10 May 2018 20:01:26 +0000 Subject: [PATCH 11/11] Revert "build: specify the key to use when invoking gpg:sign-and-deploy-file (#16696)" This reverts commit eab6e5a317acf67409f82bc5c1f4d959413dfd47. --- build/ci.go | 21 ++++++++------------- internal/build/pgp.go | 12 ------------ 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/build/ci.go b/build/ci.go index 79dcc146c3..204c206752 100644 --- a/build/ci.go +++ b/build/ci.go @@ -755,18 +755,14 @@ func doAndroidArchive(cmdline []string) { os.Rename(archive, meta.Package+".aar") if *signer != "" && *deploy != "" { // Import the signing key into the local GPG instance - b64key := os.Getenv(*signer) - key, err := base64.StdEncoding.DecodeString(b64key) - if err != nil { - log.Fatalf("invalid base64 %s", *signer) - } - gpg := exec.Command("gpg", "--import") - gpg.Stdin = bytes.NewReader(key) - build.MustRun(gpg) - - keyID, err := build.PGPKeyID(string(key)) - if err != nil { - log.Fatal(err) + if b64key := os.Getenv(*signer); b64key != "" { + key, err := base64.StdEncoding.DecodeString(b64key) + if err != nil { + log.Fatalf("invalid base64 %s", *signer) + } + gpg := exec.Command("gpg", "--import") + gpg.Stdin = bytes.NewReader(key) + build.MustRun(gpg) } // Upload the artifacts to Sonatype and/or Maven Central repo := *deploy + "/service/local/staging/deploy/maven2" @@ -775,7 +771,6 @@ func doAndroidArchive(cmdline []string) { } build.MustRunCommand("mvn", "gpg:sign-and-deploy-file", "-e", "-X", "-settings=build/mvn.settings", "-Durl="+repo, "-DrepositoryId=ossrh", - "-Dgpg.keyname="+keyID, "-DpomFile="+meta.Package+".pom", "-Dfile="+meta.Package+".aar") } } diff --git a/internal/build/pgp.go b/internal/build/pgp.go index c7d0d23397..79ab9c06f1 100644 --- a/internal/build/pgp.go +++ b/internal/build/pgp.go @@ -57,15 +57,3 @@ func PGPSignFile(input string, output string, pgpkey string) error { // Generate the signature and return return openpgp.ArmoredDetachSign(out, keys[0], in, nil) } - -// PGPKeyID parses an armored key and returns the key ID. -func PGPKeyID(pgpkey string) (string, error) { - keys, err := openpgp.ReadArmoredKeyRing(bytes.NewBufferString(pgpkey)) - if err != nil { - return "", err - } - if len(keys) != 1 { - return "", fmt.Errorf("key count mismatch: have %d, want %d", len(keys), 1) - } - return keys[0].PrimaryKey.KeyIdString(), nil -}