Skip to content

Commit

Permalink
v1.0.2 - Updated to latest Kotlin and gradle version
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshg committed Apr 24, 2017
1 parent 7e60b8e commit 31b4a02
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 🏺 Install Certs [ ![version](https://img.shields.io/badge/installcerts-1.0.1-green.svg) ](https://github.com/sureshg/InstallCerts/releases/download/1.0.1/installcerts)
# 🏺 Install Certs [ ![version](https://img.shields.io/badge/installcerts-1.0.2-green.svg) ](https://github.com/sureshg/InstallCerts/releases/download/1.0.2/installcerts)

`InstallCerts` is a simple cli tool to create [PKCS12](https://en.wikipedia.org/wiki/PKCS_12) trustStore by retrieving server's TLS certificates.
You can achieve the same using [OpenSSL](https://en.wikipedia.org/wiki/OpenSSL) and java [Keytool](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) commands, but `InstallCerts` makes it fully automated using a single command.
Expand All @@ -7,7 +7,7 @@ You can achieve the same using [OpenSSL](https://en.wikipedia.org/wiki/OpenSSL)

* Binary

[Download (v1.0.1)](https://github.com/sureshg/InstallCerts/releases/download/1.0.1/installcerts)
[Download (v1.0.2)](https://github.com/sureshg/InstallCerts/releases/download/1.0.2/installcerts)

> After download, make sure to set the execute permission (`chmod +x installcerts`). Windows users can run the executable jar.
Expand All @@ -20,7 +20,7 @@ You can achieve the same using [OpenSSL](https://en.wikipedia.org/wiki/OpenSSL)
```
> The binary would be located at `build/libs/installcerts`

Inorder to build a new version, change `appVersion` in the [gradle properties](https://github.com/sureshg/InstallCerts/blob/master/gradle.properties) or pass it to `./gradlew -PappVersion=1.0.1`
Inorder to build a new version, change `appVersion` in the [gradle properties](https://github.com/sureshg/InstallCerts/blob/master/gradle.properties) or pass it to `./gradlew -PappVersion=1.0.2`

### Usage

Expand Down Expand Up @@ -163,7 +163,7 @@ $ installcerts -h
* Debug TLS Session (`-d`)

```ruby
$ installcerts https://rsa2048.badssl.com/ -d
$ installcerts https://rsa2048.badssl.com/ -a -d
➤ Enabling TLS debug tracing...
Loading default ca truststore...
Expand All @@ -185,20 +185,15 @@ $ installcerts -h
0040: 0E 00 33 00 32 C0 2B C0 2F 00 9C C0 2D C0 31 00 ..3.2.+./...-.1.
...
Cached client session: [Session-1, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256]
[read] MD5 and SHA1 hashes: len = 16
0000: 14 00 00 0C 98 CD 71 4B 98 1E 07 A0 3B 82 B1 84 ......qK....;...
main, called close()
main, called closeInternal(true)
main, SEND TLSv1.2 ALERT: warning, description = close_notify
Padded plaintext before ENCRYPTION: len = 2
0000: 01 00 ..
main, WRITE: TLSv1.2 Alert, length = 26
[Raw write]: length = 31
0000: 15 03 03 00 1A 00 00 00 00 00 00 00 01 71 F1 91 .............q..
0010: C5 97 8D 78 EC FA 7D B4 C5 91 69 6C BD 99 78 ...x......il..x
0000: 15 03 03 00 1A 00 00 00 00 00 00 00 01 18 B9 59 ...............Y
0010: 96 9B 04 93 CB 8A 4C EC D8 B1 9B 0C 43 76 E3 ......L.....Cv.
main, called closeSocket(true)
🍺 No errors, certificate is already trusted!
...
```

* Some useful Keytool commands
Expand Down
16 changes: 9 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ buildscript {
var wrapperVersion: String by extra

javaVersion = JavaVersion.VERSION_1_8
kotlinVersion = "1.1.2-eap-44"
wrapperVersion = "3.5-20170331195952+0000"
kotlinVersion = "1.1.2-eap-77"
wrapperVersion = "4.0-20170421144052+0000"
kotlinEAPRepo = "https://dl.bintray.com/kotlin/kotlin-eap-1.1"

repositories {
Expand Down Expand Up @@ -91,8 +91,8 @@ tasks.withType<Jar> {
attributes(mapOf("Built-By" to appAuthor,
"Built-Date" to buildDateTime,
IMPLEMENTATION_VERSION.toString() to appVersion,
IMPLEMENTATION_TITLE.toString() to application().applicationName,
MAIN_CLASS.toString() to application().mainClassName))
IMPLEMENTATION_TITLE.toString() to application.applicationName,
MAIN_CLASS.toString() to application.mainClassName))
}
}

Expand All @@ -101,13 +101,15 @@ tasks.withType<Jar> {
*/
task<FatCapsule>("makeExecutable") {
val minJavaVer = javaVersion.toString()
archiveName = application().applicationName
val appName = application.applicationName
val appMainClass = application.mainClassName
archiveName = appName
reallyExecutable = ReallyExecutableSpec().regular()
capsuleManifest = CapsuleManifest().apply {
premainClass = "Capsule"
mainClass = "Capsule"
applicationName = application().applicationName
applicationClass = application().mainClassName
applicationName = appName
applicationClass = appMainClass
applicationVersion = version
jvmArgs = listOf("-client")
minJavaVersion = minJavaVer
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ org.gradle.script.lang.kotlin.accessors.auto=true

# Project custom properties
appAuthor=Suresh
appVersion=1.0.1
appVersion=1.0.2
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Apr 13 16:08:47 PDT 2017
#Mon Apr 24 13:47:20 PDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-3.5-20170331195952+0000-all.zip
distributionUrl=https\://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-4.0-20170421144052+0000-all.zip

0 comments on commit 31b4a02

Please sign in to comment.