mirror of
https://github.com/corda/corda.git
synced 2025-01-15 01:10:33 +00:00
Add version logging to hsm signing service (#502)
Add version logging to hsm signing service
This commit is contained in:
parent
d79e365a5b
commit
e4d2155671
@ -112,10 +112,3 @@ dependencies {
|
|||||||
compile "org.bouncycastle:bcprov-jdk15on:${bouncycastle_version}"
|
compile "org.bouncycastle:bcprov-jdk15on:${bouncycastle_version}"
|
||||||
compile "org.bouncycastle:bcpkix-jdk15on:${bouncycastle_version}"
|
compile "org.bouncycastle:bcpkix-jdk15on:${bouncycastle_version}"
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
|
||||||
classifier "ignore"
|
|
||||||
manifest {
|
|
||||||
attributes('Network-Management-Version': version)
|
|
||||||
}
|
|
||||||
}
|
|
@ -23,6 +23,11 @@ task buildHsmJAR(type: FatCapsule, dependsOn: 'jar') {
|
|||||||
project(':network-management').configurations.runtime,
|
project(':network-management').configurations.runtime,
|
||||||
project(':network-management').jar
|
project(':network-management').jar
|
||||||
)
|
)
|
||||||
|
tasks.withType(Jar) { task ->
|
||||||
|
manifest {
|
||||||
|
attributes('Signing-Service-Version': version)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
|
@ -23,6 +23,11 @@ task buildDoormanJAR(type: FatCapsule, dependsOn: ':network-management:jar') {
|
|||||||
project(':network-management').configurations.runtime,
|
project(':network-management').configurations.runtime,
|
||||||
project(':network-management').jar
|
project(':network-management').jar
|
||||||
)
|
)
|
||||||
|
tasks.withType(Jar) { task ->
|
||||||
|
manifest {
|
||||||
|
attributes('Doorman-Version': version)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
|
@ -42,9 +42,9 @@ class ApproveAllCertificateRequestStorage(private val delegate: CertificateSigni
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun logNetworkManagementVersion() {
|
private fun logDoormanVersion() {
|
||||||
if (Manifests.exists("Network-Management-Version")) {
|
if (Manifests.exists("Doorman-Version")) {
|
||||||
println("Network Management Version: ${Manifests.read("Network-Management-Version")}")
|
println("Doorman Version: ${Manifests.read("Doorman-Version")}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ fun main(args: Array<String>) {
|
|||||||
try {
|
try {
|
||||||
parseParameters(*args).run {
|
parseParameters(*args).run {
|
||||||
println("Starting in $mode mode")
|
println("Starting in $mode mode")
|
||||||
logNetworkManagementVersion()
|
logDoormanVersion()
|
||||||
when (mode) {
|
when (mode) {
|
||||||
Mode.ROOT_KEYGEN -> generateRootKeyPair(
|
Mode.ROOT_KEYGEN -> generateRootKeyPair(
|
||||||
rootStorePath ?: throw IllegalArgumentException("The 'rootStorePath' parameter must be specified when generating keys!"),
|
rootStorePath ?: throw IllegalArgumentException("The 'rootStorePath' parameter must be specified when generating keys!"),
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.r3.corda.networkmanage.hsm
|
package com.r3.corda.networkmanage.hsm
|
||||||
|
|
||||||
import com.google.common.primitives.Booleans
|
import com.google.common.primitives.Booleans
|
||||||
|
import com.jcabi.manifests.Manifests
|
||||||
import com.r3.corda.networkmanage.common.persistence.configureDatabase
|
import com.r3.corda.networkmanage.common.persistence.configureDatabase
|
||||||
import com.r3.corda.networkmanage.common.utils.ShowHelpException
|
import com.r3.corda.networkmanage.common.utils.ShowHelpException
|
||||||
import com.r3.corda.networkmanage.common.utils.initialiseSerialization
|
import com.r3.corda.networkmanage.common.utils.initialiseSerialization
|
||||||
@ -14,7 +15,14 @@ import javax.crypto.Cipher
|
|||||||
|
|
||||||
private val logger = LogManager.getLogger("com.r3.corda.networkmanage.hsm.Main")
|
private val logger = LogManager.getLogger("com.r3.corda.networkmanage.hsm.Main")
|
||||||
|
|
||||||
|
private fun logServiceVersion() {
|
||||||
|
if (Manifests.exists("Signing-Service-Version")) {
|
||||||
|
println("Signing Service Version: ${Manifests.read("Signing-Service-Version")}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
logServiceVersion()
|
||||||
parseParameters(*args).run {
|
parseParameters(*args).run {
|
||||||
try {
|
try {
|
||||||
// Validate
|
// Validate
|
||||||
|
Loading…
Reference in New Issue
Block a user