Branch: Tag:

2014-02-20

2014-02-20 23:08:08 by Martin Nilsson <nilsson@opera.com>

Added ECDSA SHA1, and some additional debug.

82:   #endif    Identifiers.dsa_sha256_id->get_der() : Crypto.SHA256,    +  Identifiers.ecdsa_sha1_id->get_der() : Crypto.SHA1,   #if constant(Crypto.SHA224)    Identifiers.ecdsa_sha224_id->get_der() : Crypto.SHA224,   #endif
108:    //! indicated hash @[algorithm].    int(0..1) verify(Sequence algorithm, string msg, string signature)    { +  DBG("Verify hash %O\n", algorithm[0]);    Crypto.Hash hash = algorithms[algorithm[0]->get_der()];    if (!hash) return 0;    return pkc && pkc->pkcs_verify(msg, hash, signature);    } -  +  +  protected string _sprintf(int t) +  { +  return t=='O' && sprintf("%O(%O)", this_program, pkc);    } -  + }      protected class RSAVerifier   {
988:       if (tbs->issuer->get_der() == tbs->subject->get_der())    { -  DBG("Self signed certificate\n"); +  DBG("Self signed certificate: %O\n", tbs->public_key);    v = tbs->public_key;    }    else