Skip to content

Commit fdaf379

Browse files
CORE-2436 Extend manifest scanning to capture custom crypto classes. (#119)
* CORE-2436 Extend manifest scanning to capture custom crypto classes. Scan for cpks DigestAlgorithmFactory Scan classes implementing net.corda.v5.cipher.suite.DigestAlgorithmFactory in a cpk and add them to the cpk's manifest. Part of POC (see Jira) to demonstrate we can define and instantiate custom crypto. * CORE-2436 Bump API version as scanning for custom crypto classes is a breaking API change. * CORE-2436 Rename crypto classes manifest entry Address PR comment and rename custom crypto to digest-algorithm-factory where appropriate.
1 parent a970ab9 commit fdaf379

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

.gitignore

+3-4
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,12 @@ crashlytics-build.properties
5555
*.swo
5656

5757
# Files you may find useful to have in your working directory.
58-
PLAN
59-
NOTES
60-
TODO
58+
PLAN*
59+
NOTES*
60+
TODO*
6161

6262
# gradle-dependx plugin
6363
.dependx/
6464

6565
# Directory generated during Resolve and TestOSGi gradle tasks
6666
bnd/
67-

cordapp-configuration/src/main/resources/net/corda/cordapp/cordapp-configuration.properties

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Corda-CheckpointCustomSerializer-Classes=IMPLEMENTS;net.corda.v5.serialization.C
88
Corda-NotaryService-Classes=EXTENDS;net.corda.v5.ledger.notary.NotaryService
99
Corda-StateAndRefPostProcessor-Classes=IMPLEMENTS;net.corda.v5.ledger.services.vault.StateAndRefPostProcessor
1010
Corda-CustomQueryPostProcessor-Classes=IMPLEMENTS;net.corda.v5.application.services.persistence.CustomQueryPostProcessor
11+
Corda-DigestAlgorithmFactory-Classes=IMPLEMENTS;net.corda.v5.cipher.suite.DigestAlgorithmFactory
1112

1213
# Corda should adjust this version over time, as required.
1314
Minimum-Corda-Plugins-Version=6.0.0

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cordaProductVersion = 5.0.0
77
# NOTE: update this each time this module contains a breaking change
88
## NOTE: currently this is a top level revision, so all API versions will line up, but this could be moved to
99
## a per module property in which case module versions can change independently.
10-
cordaApiRevision = 19
10+
cordaApiRevision = 20
1111

1212
# Main
1313
kotlinVersion = 1.4.32

packaging/src/main/kotlin/net/corda/packaging/CordappManifest.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ data class CordappManifest(
4343
const val CORDAPP_STATE_AND_REF_PROCESSORS = "Corda-StateAndRefPostProcessor-Classes"
4444
const val CORDAPP_CUSTOM_QUERY_PROCESSORS = "Corda-CustomQueryPostProcessor-Classes"
4545
const val CORDAPP_NOTARIES = "Corda-NotaryService-Classes"
46+
const val CORDAPP_DIGEST_ALGORITHM_FACTORIES = "Corda-DigestAlgorithmFactory-Classes"
4647

4748
private operator fun Manifest.get(key: String): String? = mainAttributes.getValue(key)
4849

@@ -132,11 +133,12 @@ data class CordappManifest(
132133
val queryPostProcessors: Set<String>
133134
get() = parseSet(CORDAPP_STATE_AND_REF_PROCESSORS) + parseSet(CORDAPP_CUSTOM_QUERY_PROCESSORS)
134135
val notaryProtocols: Set<String> get() = parseSet(CORDAPP_NOTARIES)
136+
val digestAlgorithmFactories: Set<String> get() = parseSet(CORDAPP_DIGEST_ALGORITHM_FACTORIES)
135137
}
136138

137139
/** Information on a contract or workflow CorDapp in a [CordappManifest]. */
138140
data class ManifestCordappInfo(
139141
val shortName: String?,
140142
val vendor: String?,
141143
val versionId: Int?,
142-
val licence: String?)
144+
val licence: String?)

0 commit comments

Comments
 (0)