Various cleanups to AMQP and Kryo serialisation:

* PartyAndCertificate serialiser has been converted to deal with just CertPath
* Removed X500Name serialiser as we no longer use the BC implementation and have our own CordaX500Name
* Converted X509 cert serialiser to use Java certs and not BC X509 cert holder
* Added to test to AMQP serialisation to make sure c'tor is invoked on deserialisation
This commit is contained in:
Shams Asari
2017-11-20 11:57:58 +00:00
parent 288eb5fcc4
commit f7e51a9ae1
12 changed files with 166 additions and 169 deletions

View File

@ -0,0 +1,13 @@
package net.corda.core.contracts
import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.Test
class PrivacySaltTest {
@Test
fun `all-zero PrivacySalt not allowed`() {
assertThatExceptionOfType(IllegalArgumentException::class.java).isThrownBy {
PrivacySalt(ByteArray(32))
}.withMessage("Privacy salt should not be all zeros.")
}
}