File tree Expand file tree Collapse file tree 7 files changed +32
-8
lines changed
src/main/kotlin/me/stojan/kmspgp Expand file tree Collapse file tree 7 files changed +32
-8
lines changed Original file line number Diff line number Diff line change 1+ name : Quality
2+
3+ on : pull_request
4+
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v2
10+ - uses : actions/setup-java@v2
11+ with :
12+ distribution : microsoft
13+ java-version : 11
14+ cache : gradle
15+ - run : |
16+ set -x
17+
18+ ./gradlew --no-daemon jar
Original file line number Diff line number Diff line change @@ -22,17 +22,18 @@ jobs:
2222 set -x
2323
2424 ./gradlew --no-daemon jar distZip
25-
25+
2626 docker run \
2727 -v $(pwd)/build:/build \
2828 -w /build \
2929 -t ghcr.io/graalvm/native-image \
3030 --no-fallback \
31+ --enable-http \
3132 --enable-https \
3233 -jar "libs/kmspgp-$GITHUB_RELEASE_NAME.jar" \
33- "kmspgp-$GITHUB_RELEASE_NAME-linux-amd64"
34-
34+ "kmspgp-$GITHUB_RELEASE_NAME-linux-amd64"
35+
3536 gh release upload "$GITHUB_RELEASE_NAME" \
3637 "build/distributions/kmspgp-$GITHUB_RELEASE_NAME.zip" \
3738 "build/libs/kmspgp-$GITHUB_RELEASE_NAME.jar" \
38- "build/kmspgp-$GITHUB_RELEASE_NAME-linux-amd64"
39+ "build/kmspgp-$GITHUB_RELEASE_NAME-linux-amd64"
Original file line number Diff line number Diff line change 11# KMS for PGP/GPG
22
33This tool allows you to use [ AWS KMS] [ aws-kms ] asymmetric keys as if they were
4- PGP/GPG keys.
4+ PGP/GPG keys. (Only for signatures for now.)
55
66This can be useful if you have CI/CD pipelines signing code or artifacts and
77you don't wish to do all the hassle of proper cryptographic key management.
88
9+ It's also useful if you wish to use AWS CloudHSM keys via the KMS API for
10+ PGP/GPG operations.
11+
912## How to use?
1013
1114Download the latest release from the Github Releases page. Since this is a Java
@@ -49,7 +52,7 @@ project specify the following configuration:
4952
5053```
5154git config --local gpg.program <PATH-TO-KMSPGP>
52- git config --local user.signingkey <KMS-KEY-ID >
55+ git config --local user.signingkey <KMS-KEY-ARN >
5356git config --local commit.gpgsign true
5457git config --local tag.forceSignAnnotated true
5558```
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ task("generateBuildInfo") {
6565
6666 def fileWriter = new FileWriter (file)
6767
68- fileWriter. write(" object BuildInfo { val version = \" ${ determineVersion()} \" }" )
68+ fileWriter. write(" object BuildInfo {\n val version = \" ${ determineVersion()} \"\n val commit = \" ${ System.getenv("GITHUB_SHA") ?: "<snapshot>" } \"\n }" )
6969 fileWriter. flush()
7070 fileWriter. close()
7171}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import com.github.ajalt.clikt.core.subcommands
55
66object CLI {
77 val version = BuildInfo .version
8+ val commit = BuildInfo .commit
89
910 fun run (args : Array <String >) = Root ()
1011 .run {
Original file line number Diff line number Diff line change @@ -5,5 +5,6 @@ import com.github.ajalt.clikt.core.CliktCommand
55class Version (val root : Root ) : CliktCommand(help = " Get the version." ) {
66 override fun run () {
77 echo(message = " Version: ${CLI .version} " )
8+ echo(message = " Commit: ${CLI .commit} " )
89 }
910}
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ object PGP {
4040 throw UnsupportedOperationException (" ECDSA public key of type '${pubRes.customerMasterKeySpecAsString()} ' has SubjectPublicKeyInfo which does not start with 0x04, see https://datatracker.ietf.org/doc/html/rfc5480#section-2.2" )
4141 }
4242
43- BigInteger (this , 1 , size - 1 )
43+ BigInteger (this )
4444 }
4545 )
4646
You can’t perform that action at this time.
0 commit comments