diff --git a/trunk/src/main/srs_main_server.cpp b/trunk/src/main/srs_main_server.cpp index fe7b17c85..6e589381a 100644 --- a/trunk/src/main/srs_main_server.cpp +++ b/trunk/src/main/srs_main_server.cpp @@ -222,12 +222,28 @@ void show_macro_features() #endif } +#include /** * main entrance. */ int main(int argc, char** argv) { int ret = ERROR_SUCCESS; + + _srs_internal::SrsDH dh; + dh.initialize(); + + char key[128]; int nb_key = 128; + dh.copy_public_key(key, nb_key); + for (int i = 0; i < nb_key; i++) { + printf("%#x, ", (unsigned char)key[i]); + if (((i+1) %16) == 0) { + printf("\n"); + } + } + + printf("\n"); + exit(0); // TODO: support both little and big endian. srs_assert(srs_is_little_endian()); diff --git a/trunk/src/protocol/srs_rtmp_handshake.cpp b/trunk/src/protocol/srs_rtmp_handshake.cpp index 07c475875..e240523e3 100644 --- a/trunk/src/protocol/srs_rtmp_handshake.cpp +++ b/trunk/src/protocol/srs_rtmp_handshake.cpp @@ -532,7 +532,7 @@ namespace _srs_internal return ret; } - // altough the public key is always 128bytes, but the share key maybe not. + // although the public key is always 128bytes, but the share key maybe not. // we just ignore the actual key size, but if need to use the key, must use the actual size. // TODO: FIXME: use the actual key size. //srs_assert(pkey_size == 128);