From dfa234fe9498a8ffd10a2bf1e610295260784ecc Mon Sep 17 00:00:00 2001 From: Shams Asari Date: Thu, 8 Dec 2016 13:49:39 +0000 Subject: [PATCH] Moved netpermission packages to com.r3.corda --- .../com/{r3corda => r3/corda}/netpermission/Main.kt | 6 +++--- .../internal/CertificateSigningService.kt | 6 +++--- .../persistence/CertificationRequestStorage.kt | 2 +- .../persistence/DBCertificateRequestStorage.kt | 6 +++--- .../persistence/InMemoryCertificationRequestStorage.kt | 2 +- .../netpermission/CertificateSigningServiceTest.kt | 10 +++++----- .../persistence/DBCertificateRequestStorageTest.kt | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) rename netpermission/src/main/kotlin/com/{r3corda => r3/corda}/netpermission/Main.kt (96%) rename netpermission/src/main/kotlin/com/{r3corda => r3/corda}/netpermission/internal/CertificateSigningService.kt (94%) rename netpermission/src/main/kotlin/com/{r3corda => r3/corda}/netpermission/internal/persistence/CertificationRequestStorage.kt (92%) rename netpermission/src/main/kotlin/com/{r3corda => r3/corda}/netpermission/internal/persistence/DBCertificateRequestStorage.kt (92%) rename netpermission/src/main/kotlin/com/{r3corda => r3/corda}/netpermission/internal/persistence/InMemoryCertificationRequestStorage.kt (95%) rename netpermission/src/test/kotlin/com/{r3corda => r3/corda}/netpermission/CertificateSigningServiceTest.kt (93%) rename netpermission/src/test/kotlin/com/{r3corda => r3/corda}/netpermission/internal/persistence/DBCertificateRequestStorageTest.kt (98%) diff --git a/netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt b/netpermission/src/main/kotlin/com/r3/corda/netpermission/Main.kt similarity index 96% rename from netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt rename to netpermission/src/main/kotlin/com/r3/corda/netpermission/Main.kt index 73ca5f3dbe..e1bf8cc743 100644 --- a/netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt +++ b/netpermission/src/main/kotlin/com/r3/corda/netpermission/Main.kt @@ -1,8 +1,8 @@ -package com.r3corda.netpermission +package com.r3.corda.netpermission import com.google.common.net.HostAndPort -import com.r3corda.netpermission.internal.CertificateSigningService -import com.r3corda.netpermission.internal.persistence.DBCertificateRequestStorage +import com.r3.corda.netpermission.internal.CertificateSigningService +import com.r3.corda.netpermission.internal.persistence.DBCertificateRequestStorage import joptsimple.ArgumentAcceptingOptionSpec import joptsimple.OptionParser import net.corda.core.crypto.X509Utilities diff --git a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/CertificateSigningService.kt b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/CertificateSigningService.kt similarity index 94% rename from netpermission/src/main/kotlin/com/r3corda/netpermission/internal/CertificateSigningService.kt rename to netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/CertificateSigningService.kt index d17daa135d..bdf8d4a498 100644 --- a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/CertificateSigningService.kt +++ b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/CertificateSigningService.kt @@ -1,7 +1,7 @@ -package com.r3corda.netpermission.internal +package com.r3.corda.netpermission.internal -import com.r3corda.netpermission.internal.persistence.CertificationData -import com.r3corda.netpermission.internal.persistence.CertificationRequestStorage +import com.r3.corda.netpermission.internal.persistence.CertificationData +import com.r3.corda.netpermission.internal.persistence.CertificationRequestStorage import net.corda.core.crypto.X509Utilities.CACertAndKey import net.corda.core.crypto.X509Utilities.CORDA_CLIENT_CA import net.corda.core.crypto.X509Utilities.CORDA_INTERMEDIATE_CA diff --git a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/CertificationRequestStorage.kt b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/CertificationRequestStorage.kt similarity index 92% rename from netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/CertificationRequestStorage.kt rename to netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/CertificationRequestStorage.kt index 83c13a6240..6fd177c2ab 100644 --- a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/CertificationRequestStorage.kt +++ b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/CertificationRequestStorage.kt @@ -1,4 +1,4 @@ -package com.r3corda.netpermission.internal.persistence +package com.r3.corda.netpermission.internal.persistence import org.bouncycastle.pkcs.PKCS10CertificationRequest import java.security.cert.Certificate diff --git a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/DBCertificateRequestStorage.kt b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/DBCertificateRequestStorage.kt similarity index 92% rename from netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/DBCertificateRequestStorage.kt rename to netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/DBCertificateRequestStorage.kt index 0ca242b2b6..7bd35e7250 100644 --- a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/DBCertificateRequestStorage.kt +++ b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/DBCertificateRequestStorage.kt @@ -1,4 +1,4 @@ -package com.r3corda.netpermission.internal.persistence +package com.r3.corda.netpermission.internal.persistence import net.corda.core.crypto.SecureHash import net.corda.node.utilities.* @@ -50,12 +50,12 @@ class DBCertificateRequestStorage(private val database: Database) : Certificatio override fun saveRequest(certificationData: CertificationData): String { return databaseTransaction(database) { withFinalizables { finalizables -> - val requestId = SecureHash.randomSHA256().toString() + val requestId = SecureHash.Companion.randomSHA256().toString() DataTable.insert { it[DataTable.requestId] = requestId it[hostName] = certificationData.hostName it[ipAddress] = certificationData.ipAddr - it[DataTable.request] = serializeToBlob(certificationData.request, finalizables) + it[request] = serializeToBlob(certificationData.request, finalizables) it[requestTimestamp] = LocalDateTime.now() } requestId diff --git a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/InMemoryCertificationRequestStorage.kt b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/InMemoryCertificationRequestStorage.kt similarity index 95% rename from netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/InMemoryCertificationRequestStorage.kt rename to netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/InMemoryCertificationRequestStorage.kt index 21d574120e..ff84290cfe 100644 --- a/netpermission/src/main/kotlin/com/r3corda/netpermission/internal/persistence/InMemoryCertificationRequestStorage.kt +++ b/netpermission/src/main/kotlin/com/r3/corda/netpermission/internal/persistence/InMemoryCertificationRequestStorage.kt @@ -1,4 +1,4 @@ -package com.r3corda.netpermission.internal.persistence +package com.r3.corda.netpermission.internal.persistence import net.corda.core.crypto.SecureHash import java.security.cert.Certificate diff --git a/netpermission/src/test/kotlin/com/r3corda/netpermission/CertificateSigningServiceTest.kt b/netpermission/src/test/kotlin/com/r3/corda/netpermission/CertificateSigningServiceTest.kt similarity index 93% rename from netpermission/src/test/kotlin/com/r3corda/netpermission/CertificateSigningServiceTest.kt rename to netpermission/src/test/kotlin/com/r3/corda/netpermission/CertificateSigningServiceTest.kt index d610c7b1f5..9b7228efcb 100644 --- a/netpermission/src/test/kotlin/com/r3corda/netpermission/CertificateSigningServiceTest.kt +++ b/netpermission/src/test/kotlin/com/r3/corda/netpermission/CertificateSigningServiceTest.kt @@ -1,11 +1,11 @@ -package com.r3corda.netpermission +package com.r3.corda.netpermission import com.google.common.net.HostAndPort import com.nhaarman.mockito_kotlin.* -import com.r3corda.netpermission.CertificateSigningServer.Companion.hostAndPort -import com.r3corda.netpermission.internal.CertificateSigningService -import com.r3corda.netpermission.internal.persistence.CertificationData -import com.r3corda.netpermission.internal.persistence.CertificationRequestStorage +import com.r3.corda.netpermission.CertificateSigningServer.Companion.hostAndPort +import com.r3.corda.netpermission.internal.CertificateSigningService +import com.r3.corda.netpermission.internal.persistence.CertificationData +import com.r3.corda.netpermission.internal.persistence.CertificationRequestStorage import net.corda.core.crypto.SecureHash import net.corda.core.crypto.X509Utilities import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequest diff --git a/netpermission/src/test/kotlin/com/r3corda/netpermission/internal/persistence/DBCertificateRequestStorageTest.kt b/netpermission/src/test/kotlin/com/r3/corda/netpermission/internal/persistence/DBCertificateRequestStorageTest.kt similarity index 98% rename from netpermission/src/test/kotlin/com/r3corda/netpermission/internal/persistence/DBCertificateRequestStorageTest.kt rename to netpermission/src/test/kotlin/com/r3/corda/netpermission/internal/persistence/DBCertificateRequestStorageTest.kt index 9ee3ed588b..c2429bd252 100644 --- a/netpermission/src/test/kotlin/com/r3corda/netpermission/internal/persistence/DBCertificateRequestStorageTest.kt +++ b/netpermission/src/test/kotlin/com/r3/corda/netpermission/internal/persistence/DBCertificateRequestStorageTest.kt @@ -1,4 +1,4 @@ -package com.r3corda.netpermission.internal.persistence +package com.r3.corda.netpermission.internal.persistence import net.corda.core.crypto.X509Utilities import net.corda.node.utilities.configureDatabase