Branch: Tag:

2014-12-04

2014-12-04 19:23:56 by Martin Nilsson <nilsson@opera.com>

Simplified some debug.

8:      #define PORT 25678    + #ifdef SSL3_DEBUG + #define SSL3_DEBUG_MSG(X ...) werror(X) + #else /*! SSL3_DEBUG */ + #define SSL3_DEBUG_MSG(X ...) + #endif /* SSL3_DEBUG */ +    #if constant(SSL.Cipher.CipherAlgorithm)      import Stdio;
61: Inside #if constant(SSL.Cipher.CipherAlgorithm)
      void read_callback(mixed id, string data)    { - #ifdef SSL3_DEBUG -  werror("Received: '" + data + "'\n"); - #endif +  SSL3_DEBUG_MSG("Received: '" + data + "'\n");    sslfile->set_write_callback(write_callback);    }   
115: Inside #if constant(SSL.Cipher.CipherAlgorithm)
     int main()   { - #ifdef SSL3_DEBUG -  werror("Cert: '%s'\n", Crypto.string_to_hex(my_certificate)); -  werror("Key: '%s'\n", Crypto.string_to_hex(my_key)); - // werror("Decoded cert: %O\n", SSL.asn1.ber_decode(my_certificate)->get_asn1()); - #endif +  SSL3_DEBUG_MSG("Cert: '%s'\n", Crypto.string_to_hex(my_certificate)); +  SSL3_DEBUG_MSG("Key: '%s'\n", Crypto.string_to_hex(my_key));   #if 0    array key = SSL.asn1.ber_decode(my_key)->get_asn1()[1]; - #ifdef SSL3_DEBUG -  werror("Decoded key: %O\n", key); - #endif +  SSL3_DEBUG_MSG("Decoded key: %O\n", key);    object n = key[1][1];    object e = key[2][1];    object d = key[3][1];
155:      protected void create()   { - #ifdef SSL3_DEBUG -  werror("https->create\n"); - #endif +  SSL3_DEBUG_MSG("https->create\n");    sslport::create();   }      #else // constant(SSL.Cipher.CipherAlgorithm)   constant this_program_does_not_exist = 1;   #endif