Minor reverts requested by Shams.

This commit is contained in:
josecoll 2018-01-15 11:54:24 +00:00
parent 05b8d936b5
commit 120500646c
4 changed files with 10 additions and 7 deletions

View File

@ -28,7 +28,7 @@ To run the HSM signing server:
``` ```
cd network-management cd network-management
java -jar capsule-hsm/build/libs/hsm-<version>.jar --configFile hsm.conf java -jar capsule-hsm/build/libs/hsm-<version>.jar --config-file hsm.conf
``` ```
For a list of options the HSM signing server takes, run with the `--help` option: For a list of options the HSM signing server takes, run with the `--help` option:

View File

@ -41,9 +41,7 @@ class NodeInfoWebService(private val nodeInfoStorage: NodeInfoStorage,
private val networkMapCache: LoadingCache<Boolean, Pair<SignedNetworkMap?, NetworkParameters?>> = CacheBuilder.newBuilder() private val networkMapCache: LoadingCache<Boolean, Pair<SignedNetworkMap?, NetworkParameters?>> = CacheBuilder.newBuilder()
.expireAfterWrite(config.cacheTimeout, TimeUnit.MILLISECONDS) .expireAfterWrite(config.cacheTimeout, TimeUnit.MILLISECONDS)
.build(CacheLoader.from { _ -> .build(CacheLoader.from { _ -> Pair(networkMapStorage.getCurrentNetworkMap(), networkMapStorage.getCurrentNetworkParameters()) })
Pair(networkMapStorage.getCurrentNetworkMap()
, networkMapStorage.getCurrentNetworkParameters()) })
@POST @POST
@Path("publish") @Path("publish")

View File

@ -61,7 +61,7 @@ data class Parameters(val dataSourceProperties: Properties,
fun parseParameters(vararg args: String): Parameters { fun parseParameters(vararg args: String): Parameters {
val argConfig = args.toConfigWithOptions { val argConfig = args.toConfigWithOptions {
accepts("basedir", "Overriding configuration filepath, default to current directory.").withRequiredArg().defaultsTo(".").describedAs("filepath") accepts("basedir", "Overriding configuration filepath, default to current directory.").withRequiredArg().defaultsTo(".").describedAs("filepath")
accepts("configFile", "Overriding configuration file.").withRequiredArg().defaultsTo("node.conf").describedAs("filepath") accepts("config-file", "Overriding configuration file.").withRequiredArg().describedAs("filepath")
} }
// The config-file option is changed to configFile // The config-file option is changed to configFile

View File

@ -36,8 +36,13 @@ fun freshCertificate(identityService: IdentityServiceInternal,
require(issuerRole == CertRole.LEGAL_IDENTITY) { "Confidential identities can only be issued from well known identities, provided issuer ${issuer.name} has role $issuerRole" } require(issuerRole == CertRole.LEGAL_IDENTITY) { "Confidential identities can only be issued from well known identities, provided issuer ${issuer.name} has role $issuerRole" }
val issuerCert = issuer.certificate val issuerCert = issuer.certificate
val window = X509Utilities.getCertificateValidityWindow(Duration.ZERO, 3650.days, issuerCert) val window = X509Utilities.getCertificateValidityWindow(Duration.ZERO, 3650.days, issuerCert)
val ourCertificate = X509Utilities.createCertificate(CertificateType.CONFIDENTIAL_LEGAL_IDENTITY, issuerCert.subjectX500Principal, val ourCertificate = X509Utilities.createCertificate(
issuerSigner, issuer.name.x500Principal, subjectPublicKey, window) CertificateType.CONFIDENTIAL_LEGAL_IDENTITY,
issuerCert.subjectX500Principal,
issuerSigner,
issuer.name.x500Principal,
subjectPublicKey,
window)
val ourCertPath = X509CertificateFactory().generateCertPath(listOf(ourCertificate) + issuer.certPath.certificates) val ourCertPath = X509CertificateFactory().generateCertPath(listOf(ourCertificate) + issuer.certPath.certificates)
val anonymisedIdentity = PartyAndCertificate(ourCertPath) val anonymisedIdentity = PartyAndCertificate(ourCertPath)
identityService.justVerifyAndRegisterIdentity(anonymisedIdentity) identityService.justVerifyAndRegisterIdentity(anonymisedIdentity)