2015-10-15
2015-10-15 10:17:02 by Martin Nilsson <nilsson@opera.com>
-
2c15531c58215ae38c018776f98a53c5965fdd05
(26 lines)
(+12/-14)
[
Show
| Annotate
]
Branch: 7.8
Simplified some debug.
11:
#define PORT 25678
#endif
+ #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;
64: 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);
}
118: Inside #if constant(SSL.Cipher.CipherAlgorithm)
int main()
{
- #ifdef SSL3_DEBUG
- werror("Cert: '%s'\n", String.string2hex(my_certificate));
- werror("Key: '%s'\n", String.string2hex(my_key));
- // werror("Decoded cert: %O\n", SSL.asn1.ber_decode(my_certificate)->get_asn1());
- #endif
+ SSL3_DEBUG_MSG("Cert: '%s'\n", String.string2hex(my_certificate));
+ SSL3_DEBUG_MSG("Key: '%s'\n", String.string2hex(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];
158:
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