Package com.wolfssl
Interface WolfSSLEccSharedSecretCallback
-
public interface WolfSSLEccSharedSecretCallback
wolfSSL ECC Shared Secret Callback Interface. This interface specifies how applicaitons should implement the ECC shared secret callback class to be used by wolfSSL.After implementing this interface, it should be passed as a parameter to the
WolfSSLContext.setEccSharedSecretCb()
method to be registered with the native wolfSSL library.- Version:
- 1.0, December 2017
- Author:
- wolfSSL
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
eccSharedSecretCallback(WolfSSLSession ssl, EccKey otherKey, java.nio.ByteBuffer pubKeyDer, long[] pubKeyDerSz, java.nio.ByteBuffer out, long[] outSz, int side, java.lang.Object ctx)
ECC shared secret callback method.
-
-
-
Method Detail
-
eccSharedSecretCallback
int eccSharedSecretCallback(WolfSSLSession ssl, EccKey otherKey, java.nio.ByteBuffer pubKeyDer, long[] pubKeyDerSz, java.nio.ByteBuffer out, long[] outSz, int side, java.lang.Object ctx)
ECC shared secret callback method. This method acts as ECC shared secret callback.- Parameters:
ssl
- the current SSL session object from which the callback was initiated.otherKey
- Other ECC key. On client side, holds other public key. On server side, holds private key.pubKeyDer
- On client side, output for client to write public key. On server side, input as DER-encoded peer public key.pubKeyDerSz
- On client side, the size of the public key written to pubKeyDer should be placed in the first element of the array.out
- Output where shared secret to be placed.outSz
- Output variabe, the callback should place the size of data written to the out array in the first element of outSz.side
- represents side being called from. Either WolfSSL.WOLFSSL_CLIENT_END or WolfSSL.WOLFSSL_SERVER_END.ctx
- custom user-registered ECC shared secret context- Returns:
0
upon success, otherwise a negative value on error.
-
-