Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 630804 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/openssl.c (+4 lines)
Lines 1056-1061 _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session, Link Here
1056
                              "Unable to extract public key from private key "
1056
                              "Unable to extract public key from private key "
1057
                              "file: Unable to open private key file");
1057
                              "file: Unable to open private key file");
1058
    }
1058
    }
1059
#if OPENSSL_VERSION_NUMBER < 0x10100000L
1059
    if (!EVP_get_cipherbyname("des")) {
1060
    if (!EVP_get_cipherbyname("des")) {
1060
        /* If this cipher isn't loaded it's a pretty good indication that none
1061
        /* If this cipher isn't loaded it's a pretty good indication that none
1061
         * are.  I have *NO DOUBT* that there's a better way to deal with this
1062
         * are.  I have *NO DOUBT* that there's a better way to deal with this
Lines 1064-1069 _libssh2_pub_priv_keyfile(LIBSSH2_SESSION *session, Link Here
1064
         */
1065
         */
1065
        OpenSSL_add_all_ciphers();
1066
        OpenSSL_add_all_ciphers();
1066
    }
1067
    }
1068
#endif
1067
    BIO_reset(bp);
1069
    BIO_reset(bp);
1068
    pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
1070
    pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
1069
    BIO_free(bp);
1071
    BIO_free(bp);
Lines 1132-1137 _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session, Link Here
1132
    if (!bp) {
1134
    if (!bp) {
1133
        return -1;
1135
        return -1;
1134
    }
1136
    }
1137
#if OPENSSL_VERSION_NUMBER < 0x10100000L
1135
    if (!EVP_get_cipherbyname("des")) {
1138
    if (!EVP_get_cipherbyname("des")) {
1136
        /* If this cipher isn't loaded it's a pretty good indication that none
1139
        /* If this cipher isn't loaded it's a pretty good indication that none
1137
         * are.  I have *NO DOUBT* that there's a better way to deal with this
1140
         * are.  I have *NO DOUBT* that there's a better way to deal with this
Lines 1140-1145 _libssh2_pub_priv_keyfilememory(LIBSSH2_SESSION *session, Link Here
1140
         */
1143
         */
1141
        OpenSSL_add_all_ciphers();
1144
        OpenSSL_add_all_ciphers();
1142
    }
1145
    }
1146
#endif
1143
    BIO_reset(bp);
1147
    BIO_reset(bp);
1144
    pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
1148
    pk = PEM_read_bio_PrivateKey(bp, NULL, NULL, (void*)passphrase);
1145
    BIO_free(bp);
1149
    BIO_free(bp);
(-)a/src/openssl.h (+6 lines)
Lines 226-235 int _libssh2_md5_init(libssh2_md5_ctx *ctx); Link Here
226
#define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
226
#define libssh2_hmac_cleanup(ctx) HMAC_cleanup(ctx)
227
#endif
227
#endif
228
228
229
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
230
#define libssh2_crypto_init() \
231
  ENGINE_load_builtin_engines(); \
232
  ENGINE_register_all_complete()
233
#else
229
#define libssh2_crypto_init() \
234
#define libssh2_crypto_init() \
230
  OpenSSL_add_all_algorithms(); \
235
  OpenSSL_add_all_algorithms(); \
231
  ENGINE_load_builtin_engines(); \
236
  ENGINE_load_builtin_engines(); \
232
  ENGINE_register_all_complete()
237
  ENGINE_register_all_complete()
238
#endif
233
239
234
#define libssh2_crypto_exit()
240
#define libssh2_crypto_exit()
235
241

Return to bug 630804