{"action":"closed","issue":{"url":"https://api.github.com/repos/pyca/cryptography/issues/3206","repository_url":"https://api.github.com/repos/pyca/cryptography","labels_url":"https://api.github.com/repos/pyca/cryptography/issues/3206/labels{/name}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/3206/comments","events_url":"https://api.github.com/repos/pyca/cryptography/issues/3206/events","html_url":"https://github.com/pyca/cryptography/issues/3206","id":184653841,"number":3206,"title":"[help wanted] ","user":{"login":"jonathannaguin","id":265395,"avatar_url":"https://avatars.githubusercontent.com/u/265395?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathannaguin","html_url":"https://github.com/jonathannaguin","followers_url":"https://api.github.com/users/jonathannaguin/followers","following_url":"https://api.github.com/users/jonathannaguin/following{/other_user}","gists_url":"https://api.github.com/users/jonathannaguin/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathannaguin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathannaguin/subscriptions","organizations_url":"https://api.github.com/users/jonathannaguin/orgs","repos_url":"https://api.github.com/users/jonathannaguin/repos","events_url":"https://api.github.com/users/jonathannaguin/events{/privacy}","received_events_url":"https://api.github.com/users/jonathannaguin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-22T20:59:44Z","updated_at":"2016-10-24T20:16:51Z","closed_at":"2016-10-24T20:16:51Z","body":"Hi, \r\n\r\nI have some difficulties with the following code:\r\n```\r\nsr_private_key = serialization.load_pem_private_key(/**/, password=None, backend=default_backend())\r\n\r\ndecrypted = sr_private_key.decrypt(encrypted_text, padding.OAEP(mgf=padding.MGF1(algorithm=hashes.SHA256()), algorithm=hashes.SHA256(), label=None))\r\n```\r\n\r\nThe above works perfectly when I run it in my Mac OS El Capitan, but fails when I run it in a AWS EC2 instance:\r\n```\r\nraceback (most recent call last):\r\n  File \"test.py\", line 33, in <module>\r\n    decrypted = sr_private_key.decrypt(encrypted_text, padding.OAEP(mgf=padding.MGF1(algorithm=hashes.SHA256()), algorithm=hashes.SHA256(), label=None))\r\n  File \"/usr/local/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/rsa.py\", line 407, in decrypt\r\n    return _enc_dec_rsa(self._backend, self, ciphertext, padding)\r\n  File \"/usr/local/lib64/python2.7/site-packages/cryptography/hazmat/backends/openssl/rsa.py\", line 53, in _enc_dec_rsa\r\n    _Reasons.UNSUPPORTED_PADDING\r\ncryptography.exceptions.UnsupportedAlgorithm: This combination of padding and hash algorithm is not supported by this backend.\r\n```\r\nI believe that the OpenSSL version could be related to this issue, but not sure, this is what I get when I run it in the EC2:\r\n```\r\npython -c \"from cryptography.hazmat.backends.openssl.backend import backend;print(backend.openssl_version_text())\"\r\nOpenSSL 1.0.1k-fips 8 Jan 2015\r\n```\r\nAnd this is from my Mac:\r\n```\r\npython -c \"from cryptography.hazmat.backends.openssl.backend import backend;print(backend.openssl_version_text())\"\r\nOpenSSL 1.0.2j  26 Sep 2016\r\n```\r\n\r\nCould this be the cause of the issue? Is this OpenSSL built-in inside cryptography?\r\n\r\nThanks!\r\n\r\n"}}
{"actor":{"display_login":"jonathannaguin"}}