- For dknewkey.py make default to include h=sha256 in the DNS record to

exclude usage with sha1.  Can be overriden.
This commit is contained in:
Scott Kitterman
2017-06-21 01:22:26 -04:00
parent 693996d5f6
commit e06014404c
2 changed files with 11 additions and 1 deletions
+2
View File
@@ -4,6 +4,8 @@ UNRELEASED Version 0.7.0
- Add command line options to dkimsign.py to select header and body - Add command line options to dkimsign.py to select header and body
canonicalization algorithmns (LP: #1272724) canonicalization algorithmns (LP: #1272724)
- Add command line option to dkimsign.py to select signing algorithm - Add command line option to dkimsign.py to select signing algorithm
- For dknewkey.py make default to include h=sha256 in the DNS record to
exclude usage with sha1. Can be overriden.
2017-05-30 Version 0.6.2 2017-05-30 Version 0.6.2
- Fixed problem with header folding that caused the first line to be - Fixed problem with header folding that caused the first line to be
+9 -1
View File
@@ -17,6 +17,8 @@
# #
# Copyright (c) 2016 Google, Inc. # Copyright (c) 2016 Google, Inc.
# Contact: Brandon Long <blong@google.com> # Contact: Brandon Long <blong@google.com>
# Modified by Scott Kitterman <scott@kitterman.com>
# Copyright (c) 2017 Scott Kitterman
"""Generates new domainkeys pairs. """Generates new domainkeys pairs.
@@ -34,6 +36,9 @@ import tempfile
# how strong are our keys? # how strong are our keys?
BITS_REQUIRED = 2048 BITS_REQUIRED = 2048
# limit to rsa-sha256?
HTAG='sha256'
# what openssl binary do we use to do key manipulation? # what openssl binary do we use to do key manipulation?
OPENSSL_BINARY = '/usr/bin/openssl' OPENSSL_BINARY = '/usr/bin/openssl'
@@ -60,7 +65,10 @@ def ExtractDnsPublicKey(private_key_file, dns_file):
os.unlink(working_file) os.unlink(working_file)
dns_fp = open(dns_file, "w+") dns_fp = open(dns_file, "w+")
print >> sys.stderr, 'writing ' + dns_file print >> sys.stderr, 'writing ' + dns_file
print >> dns_fp, "k=rsa; p=%s" % output if HTAG:
print >> dns_fp, "k=rsa; h={0}; p={1}".format(HTAG,output)
else:
print >> dns_fp, "k=rsa; p=%s" % output
dns_fp.close() dns_fp.close()