]> git.sesse.net Git - rdpsrv/blobdiff - mcs.c
Decrypt the client random (although not without Valgrind hits from OpenSSL...)
[rdpsrv] / mcs.c
diff --git a/mcs.c b/mcs.c
index 6e13770f5f74adc9145bedca2445519258a26527..e771a074a7dd65ce2bd1de0f15e0e228673fe0db 100644 (file)
--- a/mcs.c
+++ b/mcs.c
@@ -395,10 +395,12 @@ mcs_send_connect_response()
        // this is a good time to load our private key :-)
        {
                unsigned char *buf = (unsigned char *)malloc(1024);
-               unsigned char *ptr = buf;
+               const unsigned char *ptr = buf;
                memcpy(buf, private_key, sizeof(private_key));
                privkey = d2i_RSAPrivateKey(NULL, &ptr, sizeof(private_key));
                free(buf);
+
+               printf("Loaded private key (%u bytes)\n", sizeof(private_key));
        }
 }