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

int ECDSA_sign_ex ( int  type,
const unsigned char *  dgst,
int  dgstlen,
unsigned char *  sig,
unsigned int *  siglen,
const BIGNUM *  kinv,
const BIGNUM *  rp,
EC_KEY *  eckey 
)

ECDSA_sign_ex computes ECDSA signature of a given hash value using the supplied private key (note: sig must point to ECDSA_size(eckey) bytes of memory).

Parameters:
type this parameter is ignored
dgst pointer to the hash value to sign
dgstlen length of the hash value
sig buffer to hold the DER encoded signature
siglen pointer to the length of the returned signature
kinv optional pointer to a pre-computed inverse k
rp optional pointer to the pre-computed rp value (see ECDSA_sign_setup
eckey pointer to the EC_KEY object containing a private EC key
Returns:
1 on success and 0 otherwise

Definition at line 81 of file ecs_sign.c.

References ECDSA_do_sign_ex(), ECDSA_SIG_free(), ECDSA_sign_ex(), and i2d_ECDSA_SIG().

Referenced by ECDSA_sign(), and ECDSA_sign_ex().

{
      ECDSA_SIG *s;
      s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey);
      if (s == NULL)
      {
            *siglen=0;
            return 0;
      }
      *siglen = i2d_ECDSA_SIG(s, &sig);
      ECDSA_SIG_free(s);
      return 1;
}


Generated by  Doxygen 1.6.0   Back to index