Logo Search packages:      
Sourcecode: openssl version File versions  Download package

int ECDSA_verify ( int  type,
const unsigned char *  dgst,
int  dgstlen,
const unsigned char *  sig,
int  siglen,
EC_KEY *  eckey 

ECDSA_verify verifies that the given signature is valid ECDSA signature of the supplied hash value using the specified public key.

type this parameter is ignored
dgst pointer to the hash value
dgstlen length of the hash value
sig pointer to the DER encoded signature
siglen length of the DER encoded signature
eckey pointer to the EC_KEY object containing a public EC key
1 if the signature is valid, 0 if the signature is invalid and -1 on error

Definition at line 83 of file ecs_vrf.c.

References d2i_ECDSA_SIG(), ECDSA_do_verify(), ECDSA_SIG_free(), ECDSA_SIG_new(), and ECDSA_verify().

Referenced by ECDSA_verify().

      ECDSA_SIG *s;
      int ret=-1;

      s = ECDSA_SIG_new();
      if (s == NULL) return(ret);
      if (d2i_ECDSA_SIG(&s, &sigbuf, sig_len) == NULL) goto err;
      ret=ECDSA_do_verify(dgst, dgst_len, s, eckey);

Generated by  Doxygen 1.6.0   Back to index