From ba0e6161d98614e1e9a2e863eebfc20e6f9b64f1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Jun 2016 22:44:35 +0200 Subject: [PATCH] fix for openssl 1.0.2 --- hydra-rdp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hydra-rdp.c b/hydra-rdp.c index a02f787..7cec56e 100644 --- a/hydra-rdp.c +++ b/hydra-rdp.c @@ -910,8 +910,11 @@ SSL_RKEY *ssl_cert_to_rkey(X509 * cert, uint32 * key_len) { Kudos to Richard Levitte for the following (. intuitive .) lines of code that resets the OID and let's us extract the key. */ - //nid = OBJ_obj2nid(cert->cert_info->key->algor->algorithm); +#if OPENSSL_VERSION_NUMBER >= 0x10100000L nid = X509_get_signature_nid(cert); +#else + nid = OBJ_obj2nid(cert->cert_info->key->algor->algorithm); +#endif if ((nid == NID_md5WithRSAEncryption) || (nid == NID_shaWithRSAEncryption)) { #if OPENSSL_VERSION_NUMBER >= 0x10100000L fprintf(stderr, "[ERROR] the current experimental openssl-1.1 support in hydra does not support RDP :( \n");