diff options
author | Christian Heimes <christian@cheimes.de> | 2013-11-18 08:59:44 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-11-18 08:59:44 (GMT) |
commit | cc6cdce75095e99444492b2ed63e26c63c776128 (patch) | |
tree | f83326744cd1b4941f2f8b472b8c0c5c62bcbe8c /Modules/_hashopenssl.c | |
parent | 7f4bf9fb10945d227d131f1536ec7cd762ae029c (diff) | |
download | cpython-cc6cdce75095e99444492b2ed63e26c63c776128.zip cpython-cc6cdce75095e99444492b2ed63e26c63c776128.tar.gz cpython-cc6cdce75095e99444492b2ed63e26c63c776128.tar.bz2 |
Remove unused code path from PBKDF2 that is causing a warning on Win64
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r-- | Modules/_hashopenssl.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index b4c5b51..a866fbf 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -504,10 +504,6 @@ PKCS5_PBKDF2_HMAC_fast(const char *pass, int passlen, HMAC_CTX_init(&hctx); p = out; tkeylen = keylen; - if (!pass) - passlen = 0; - else if(passlen == -1) - passlen = strlen(pass); if (!HMAC_Init_ex(&hctx_tpl, pass, passlen, digest, NULL)) { HMAC_CTX_cleanup(&hctx_tpl); return 0; @@ -671,7 +667,7 @@ pbkdf2_hmac(PyObject *self, PyObject *args, PyObject *kwdict) Py_BEGIN_ALLOW_THREADS retval = PKCS5_PBKDF2_HMAC_fast((char*)password.buf, (int)password.len, - (unsigned char *)salt.buf, salt.len, + (unsigned char *)salt.buf, (int)salt.len, iterations, digest, dklen, (unsigned char *)key); Py_END_ALLOW_THREADS |