DigitalSignature |
open class DigitalSignature : OpaqueBytes A wrapper around a digital signature. The covering field is a generic tag usable by whatever is interpreting the signature. It isnt used currently, but experience from Bitcoin suggests such a feature is useful, especially when building partially signed transactions. |
DummyPublicKey |
class DummyPublicKey : PublicKey, Comparable<PublicKey> |
NullPublicKey |
object NullPublicKey : PublicKey, Comparable<PublicKey> |
Party |
data class Party A Party is well known (name, pubkey) pair. In a real system this would probably be an X.509 certificate. |
SecureHash |
sealed class SecureHash : OpaqueBytes |
SignedData |
open class SignedData<T : Any> A serialized piece of data and its signature. Enforces signature validity in order to deserialize the data contained within. |
WhitelistTrustManager |
class WhitelistTrustManager : X509ExtendedTrustManager Our TrustManager extension takes the standard certificate checker and first delegates all the chain checking to that. If everything is well formed we then simply add a check against our whitelist |
WhitelistTrustManagerProvider |
object WhitelistTrustManagerProvider : Provider Custom Security Provider that forces the TrustManagerFactory to be our custom one. Also holds the identity of the original TrustManager algorithm so that we can delegate most of the checking to the proper Java code. We simply add some more checks. |
WhitelistTrustManagerSpi |
class WhitelistTrustManagerSpi : TrustManagerFactorySpi Registered TrustManagerFactorySpi |
X509Utilities |
object X509Utilities |
java.security.KeyPair | |
java.security.PrivateKey | |
java.security.PublicKey | |
kotlin.ByteArray |
generateKeyPair |
fun generateKeyPair(): KeyPair A simple wrapper that will make it easier to swap out the EC algorithm we use in future |
newSecureRandom |
fun newSecureRandom(): SecureRandom |
registerWhitelistTrustManager |
fun registerWhitelistTrustManager(): Unit Call this to change the default verification algorithm and this use the WhitelistTrustManager implementation. This is a work around to the fact that ArtemisMQ and probably many other libraries dont correctly configure the SSLParameters with setEndpointIdentificationAlgorithm and thus dont check that the certificate matches with the DNS entry requested. This exposes us to man in the middle attacks. The issue has been raised with ArtemisMQ: https://issues.apache.org/jira/browse/ARTEMIS-656 |
sha256 |
fun OpaqueBytes.sha256(): SHA256 |