-
-
Save mgwilliams/5ea039eb05f2ef3bc32c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import python libs | |
import logging | |
# Import third party libs | |
from M2Crypto import RSA | |
# Set up logger | |
log = logging.getLogger(__name__) | |
def decrypt(value): | |
key = RSA.load_key('{0}/minion.pem'.format(__opts__['pki_dir'])) | |
return key.private_decrypt(value.decode('base64'), RSA.pkcs1_oaep_padding) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment