pike.git / lib / modules / Standards.pmod / X509.pmod

version» Context lines:

pike.git/lib/modules/Standards.pmod/X509.pmod:1820:       m->verified = 0;    int verified;    foreach(verifiers || ({}), Verifier v) {    if( v->verify(chain_cert[idx][1],    chain_cert[idx][0]->get_der(),    chain_cert[idx][2]->value)    && tbs)    {    DBG("signature is verified..\n"); -  m->verified = verified = 1; +  verified = 1;       // if we're the root of the chain and we've verified, this is    // the authority.    if(idx == 0)    m->authority = tbs->issuer;       if(idx == sizeof(chain_cert)-1) m->cn = tbs->subject;    break;    }    }    if (!verified)    {    ERROR(CERT_BAD_SIGNATURE);    return m;    } -  +  else if (zero_type(m->error_code)) // only if no error occured... +  m->verified = verified;    }    return m;      #undef ERROR   #undef FATAL   }      //! DWIM-parse the ASN.1-sequence for a private key.   Crypto.Sign.State parse_private_key(Sequence seq)   {