diff --git a/.gitignore b/.gitignore index 30f0748..05e967e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ mongoose*.exe # Private data fonts/EngraversGothic-Regular-webfont.* -aws-private-key.txt # Per-user stuff *.sublime-workspace diff --git a/sign-policy.py b/sign-policy.py deleted file mode 100644 index 08d3db0..0000000 --- a/sign-policy.py +++ /dev/null @@ -1,17 +0,0 @@ -import base64 -import hmac, hashlib - -f = open('aws-private-key.txt','rt') -AWS_SECRET_ACCESS_KEY = f.read() -f = open('upload-policy.txt','rt') - -policy_document = f.read() -policy_document = policy_document.replace("\n","").replace("\r","").replace("\t","").replace(" ",""); -policy = base64.b64encode(policy_document) -signature = base64.b64encode(hmac.new(AWS_SECRET_ACCESS_KEY, policy, hashlib.sha1).digest()) - -print "Signing Policy:", policy_document -print "Using secret key:", AWS_SECRET_ACCESS_KEY -print -print "Policy:", policy -print "Signature:", signature \ No newline at end of file diff --git a/upload-policy.txt b/upload-policy.txt deleted file mode 100644 index 1f1743f..0000000 --- a/upload-policy.txt +++ /dev/null @@ -1,10 +0,0 @@ -{"expiration": "2020-01-01T00:00:00Z", - "conditions": [ - {"bucket": "www.keyboard-layout-editor.com"}, - ["starts-with", "$key", "layouts/"], - {"acl": "public-read"}, - {"success_action_redirect": "http://www.keyboard-layout-editor.com"}, - {"Content-Type": "application/json"}, - ["content-length-range", 0, 16384] - ] -} \ No newline at end of file