diff options
author | lloyd <[email protected]> | 2013-04-12 14:23:00 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-04-12 14:23:00 +0000 |
commit | 184ccd6ed382fcf55370fa81b3d0004ffa7f117a (patch) | |
tree | 3093ab13b5ace29bb65ac7f7736f10c53ecc8927 /src | |
parent | 369cec8f5145e18fb46dc1ccc64370a961cd7bcd (diff) |
Add datestamp to autogenerated tls_suite_info.cpp
Diffstat (limited to 'src')
-rwxr-xr-x | src/build-data/scripts/tls_suite_info.py | 24 | ||||
-rw-r--r-- | src/tls/tls_suite_info.cpp | 5 |
2 files changed, 13 insertions, 16 deletions
diff --git a/src/build-data/scripts/tls_suite_info.py b/src/build-data/scripts/tls_suite_info.py index 2cc38a1ab..7043469d2 100755 --- a/src/build-data/scripts/tls_suite_info.py +++ b/src/build-data/scripts/tls_suite_info.py @@ -11,7 +11,9 @@ First thing, wget https://www.iana.org/assignments/tls-parameters/tls-parameters.txt """ -import sys, re +import sys +import re +import datetime def to_ciphersuite_info(code, name): @@ -98,8 +100,8 @@ def to_ciphersuite_info(code, name): ivlen = 0 if cipher_algo != 'ARC4': mode = cipher[-1] - if mode not in ['CBC', 'GCM', 'CCM']: - print "** Unknown mode %s" % (' '.join(cipher)) + if mode not in ['CBC', 'GCM', 'CCM', 'OCB']: + print "#warning Unknown mode %s" % (' '.join(cipher)) ivlen = 8 if cipher_algo == '3DES' else 16 @@ -144,16 +146,18 @@ def main(args = None): should_use = False if should_use: - suites[name] = (code,to_ciphersuite_info(code, name)) + suites[name] = (code, to_ciphersuite_info(code, name)) # From http://tools.ietf.org/html/draft-ietf-tls-56-bit-ciphersuites-01 suites['DHE_DSS_WITH_RC4_128_SHA'] = ('0066', to_ciphersuite_info('0066', 'DHE_DSS_WITH_RC4_128_SHA')) + #suites['ECDHE_RSA_WITH_AES_128_OCB_SHA256'] = ('FF66', to_ciphersuite_info('FF66', 'ECDHE_RSA_WITH_AES_128_OCB_SHA256')) + print """/* -* List of TLS cipher suites +* TLS cipher suite information * * This file was automatically generated from the IANA assignments -* by %s +* by %s on %s * * Released under the terms of the Botan license */ @@ -167,19 +171,13 @@ namespace TLS { Ciphersuite Ciphersuite::by_id(u16bit suite) { switch(suite) - { -""" % (sys.argv[0]) + {""" % (sys.argv[0], datetime.date.today().strftime("%Y-%m-%d")) for k in sorted(suites.keys()): print " case 0x%s: // %s" % (suites[k][0], k) print " return %s;" % (suites[k][1]) print - #print "return std::vector<u16bit>({" - #for k in sorted([k[0] for k in suites.values()]): - # print "0x%s, " % (k), - #print "});" - print """ } return Ciphersuite(); // some unknown ciphersuite diff --git a/src/tls/tls_suite_info.cpp b/src/tls/tls_suite_info.cpp index 522d94471..dcc5d69b4 100644 --- a/src/tls/tls_suite_info.cpp +++ b/src/tls/tls_suite_info.cpp @@ -1,8 +1,8 @@ /* -* List of TLS cipher suites +* TLS cipher suite information * * This file was automatically generated from the IANA assignments -* by ./src/build-data/scripts/tls_suite_info.py +* by ./src/build-data/scripts/tls_suite_info.py on 2013-04-12 * * Released under the terms of the Botan license */ @@ -17,7 +17,6 @@ Ciphersuite Ciphersuite::by_id(u16bit suite) { switch(suite) { - case 0x0013: // DHE_DSS_WITH_3DES_EDE_CBC_SHA return Ciphersuite(0x0013, "DSA", "DH", "3DES", 24, 8, "SHA-1", 20); |