Package com.wolfssl

Interface WolfSSLEccVerifyCallback


  • public interface WolfSSLEccVerifyCallback
    wolfSSL ECC Verification Callback Interface. This interface specifies how applicaitons should implement the ECC verification callback class to be used by wolfSSL.

    After implementing this interface, it should be passed as a parameter to the WolfSSLContext.setEccVerifyCb() method to be registered with the native wolfSSL library.

    Version:
    1.0, August 2013
    Author:
    wolfSSL
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int eccVerifyCallback​(WolfSSLSession ssl, java.nio.ByteBuffer sig, long sigSz, java.nio.ByteBuffer hash, long hashSz, java.nio.ByteBuffer keyDer, long keySz, int[] result, java.lang.Object ctx)
      ECC verification callback method.
    • Method Detail

      • eccVerifyCallback

        int eccVerifyCallback​(WolfSSLSession ssl,
                              java.nio.ByteBuffer sig,
                              long sigSz,
                              java.nio.ByteBuffer hash,
                              long hashSz,
                              java.nio.ByteBuffer keyDer,
                              long keySz,
                              int[] result,
                              java.lang.Object ctx)
        ECC verification callback method. This method acts as ECC verification callback.
        Parameters:
        ssl - the current SSL session object from which the callback was initiated.
        sig - signature to verify
        sigSz - length of the signature, sig
        hash - input buffer containing the digest of the message
        hashSz - length in bytes of the hash, hash
        keyDer - the ECC Private key in ASN1 format
        keySz - length of the key, keyDer, in bytes
        result - output variable where the result of verification should be stored, 1 for success, 0 for failure. Use the first element of the array for storage.
        ctx - custom user-registered ECC signing context
        Returns:
        0 upon success, otherwise a negative value on error.