I have a a piece of hardware which realises some crypto functions like random number generation (e.g a SmartCard). I would like to use this hardware during my TLS hadshake. Is it possible to do this, without implementing the TLS-Handshake by my own?
I tried to extend the class "SecureRandom" but the "next" methode is final so I can't override it so that it will return 'my' genetrated numbers.
So basically I would like to "outsource" all the crypto functions without implementing the TLS handshake in JAVA.
Thanks
Extend
SecureRandomSpi
instead. Then either implement aProvider
or do a cheapSecureRandom
as(The implementation of
next
relies on the given SPI)Then pass your
SecureRandom
as an argument toSSLContext.init
.