backport ENT-2844 (#4396)

This commit is contained in:
Florian Friemel 2018-12-11 15:20:49 +00:00 committed by GitHub
parent 08b4e4bd2d
commit 74a0a6116c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@ package net.corda.nodeapi.internal.cryptoservice
import net.corda.core.DoNotImplement
import net.corda.core.crypto.SignatureScheme
import net.corda.nodeapi.internal.crypto.X509Utilities
import org.bouncycastle.operator.ContentSigner
import java.security.KeyPair
import java.security.PublicKey
@ -42,12 +43,12 @@ interface CryptoService {
/**
* Returns the [SignatureScheme] that should be used for generating key pairs for the node's legal identity with this [CryptoService].
*/
fun defaultIdentitySignatureScheme(): SignatureScheme
fun defaultIdentitySignatureScheme(): SignatureScheme = X509Utilities.DEFAULT_IDENTITY_SIGNATURE_SCHEME
/**
* Returns the [SignatureScheme] that should be used with this [CryptoService] when generating key pairs for TLS.
* Returns the [SignatureScheme] that should be used with this [CryptoService] when generating TLS-compatible key pairs.
*/
fun defaultTLSSignatureScheme(): SignatureScheme
fun defaultTLSSignatureScheme(): SignatureScheme = X509Utilities.DEFAULT_TLS_SIGNATURE_SCHEME
}
open class CryptoServiceException(message: String?, cause: Throwable? = null) : Exception(message, cause)