Lines Matching defs:sig
453 DSA_SIG *sig;
454 sig = OPENSSL_malloc(sizeof(DSA_SIG));
455 if (!sig) {
458 sig->r = NULL;
459 sig->s = NULL;
460 return sig;
463 void DSA_SIG_free(DSA_SIG *sig) {
464 if (!sig) {
468 BN_free(sig->r);
469 BN_free(sig->s);
470 OPENSSL_free(sig);
569 int DSA_do_verify(const uint8_t *digest, size_t digest_len, DSA_SIG *sig,
572 if (!DSA_do_check_signature(&valid, digest, digest_len, sig, dsa)) {
579 size_t digest_len, DSA_SIG *sig, const DSA *dsa) {
614 if (BN_is_zero(sig->r) || BN_is_negative(sig->r) ||
615 BN_ucmp(sig->r, dsa->q) >= 0) {
619 if (BN_is_zero(sig->s) || BN_is_negative(sig->s) ||
620 BN_ucmp(sig->s, dsa->q) >= 0) {
627 if (BN_mod_inverse(&u2, sig->s, dsa->q, ctx) == NULL) {
649 if (!BN_mod_mul(&u2, sig->r, &u2, dsa->q, ctx)) {
673 *out_valid = BN_ucmp(&u1, sig->r) == 0;
704 const uint8_t *sig, size_t sig_len, const DSA *dsa) {
706 if (!DSA_check_signature(&valid, digest, digest_len, sig, sig_len, dsa)) {
713 size_t digest_len, const uint8_t *sig, size_t sig_len,
724 const uint8_t *sigp = sig;
725 if (d2i_DSA_SIG(&s, &sigp, sig_len) == NULL || sigp != sig + sig_len) {
731 if (der_len < 0 || (size_t)der_len != sig_len || memcmp(sig, der, sig_len)) {