aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-01-11 13:18:44 +0000
committerlloyd <[email protected]>2014-01-11 13:18:44 +0000
commite8ec0d45423a7729622040986ee6b1f3b4b9a026 (patch)
tree3d5a4fcea5ac76aa24107c01a3dc44ec0beb812e /src/scripts
parent82072559d40ac0ed1e13c3a8993cc82705e7a574 (diff)
Website tweaks. Rename TLS suite script options.
Diffstat (limited to 'src/scripts')
-rwxr-xr-xsrc/scripts/tls_suite_info.py30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/scripts/tls_suite_info.py b/src/scripts/tls_suite_info.py
index 079afd569..c28ad51d2 100755
--- a/src/scripts/tls_suite_info.py
+++ b/src/scripts/tls_suite_info.py
@@ -150,22 +150,20 @@ def process_command_line(args):
parser = optparse.OptionParser()
- parser.add_option('--include-srp-aead', action='store_true', default=False,
- help='add custom SRP AEAD suites')
- parser.add_option('--include-ocb', action='store_true', default=False,
- help='add custom OCB AEAD suites')
- parser.add_option('--include-eax', action='store_true', default=False,
- help='add custom EAX AEAD suites')
+ parser.add_option('--with-srp-aead', action='store_true', default=False,
+ help='add experimental SRP AEAD suites')
+ parser.add_option('--with-ocb', action='store_true', default=False,
+ help='add experimental OCB AEAD suites')
+ parser.add_option('--with-eax', action='store_true', default=False,
+ help='add experimental EAX AEAD suites')
parser.add_option('--save-download', action='store_true', default=True,
help='save downloaded tls-parameters.txt')
- parser.add_option('--write-direct', action='store_true', default=False,
- help='save output directly to lib/tls/tls_suite_info.cpp')
+ parser.add_option('--output', help='save output to named file instead of stdout')
return parser.parse_args(args)
-
def main(args = None):
if args is None:
args = sys.argv
@@ -216,7 +214,7 @@ def main(args = None):
define_custom_ciphersuite('DHE_DSS_WITH_RC4_128_SHA', '0066')
# Expermental things
- if options.include_ocb:
+ if options.with_ocb:
define_custom_ciphersuite('ECDHE_ECDSA_WITH_AES_128_OCB_SHA256', 'FF80')
define_custom_ciphersuite('ECDHE_ECDSA_WITH_AES_256_OCB_SHA384', 'FF81')
define_custom_ciphersuite('ECDHE_RSA_WITH_AES_128_OCB_SHA256', 'FF82')
@@ -225,25 +223,25 @@ def main(args = None):
define_custom_ciphersuite('ECDHE_PSK_WITH_AES_128_OCB_SHA256', 'FF85')
define_custom_ciphersuite('ECDHE_PSK_WITH_AES_256_OCB_SHA384', 'FF86')
- if options.include_eax:
+ if options.with_eax:
define_custom_ciphersuite('ECDHE_ECDSA_WITH_AES_128_EAX_SHA256', 'FF90')
define_custom_ciphersuite('ECDHE_ECDSA_WITH_AES_256_EAX_SHA384', 'FF91')
define_custom_ciphersuite('ECDHE_RSA_WITH_AES_128_EAX_SHA256', 'FF92')
define_custom_ciphersuite('ECDHE_RSA_WITH_AES_256_EAX_SHA384', 'FF93')
- if options.include_srp_aead:
+ if options.with_srp_aead:
define_custom_ciphersuite('SRP_SHA_WITH_AES_256_GCM_SHA384', 'FFA0')
define_custom_ciphersuite('SRP_SHA_RSA_WITH_AES_256_GCM_SHA384', 'FFA1')
define_custom_ciphersuite('SRP_SHA_DSS_WITH_AES_256_GCM_SHA384', 'FFA2')
define_custom_ciphersuite('SRP_SHA_ECDSA_WITH_AES_256_GCM_SHA384', 'FFA3')
- if options.include_ocb:
+ if options.with_ocb:
define_custom_ciphersuite('SRP_SHA_WITH_AES_256_OCB_SHA384', 'FFA4')
define_custom_ciphersuite('SRP_SHA_RSA_WITH_AES_256_OCB_SHA384', 'FFA5')
define_custom_ciphersuite('SRP_SHA_DSS_WITH_AES_256_OCB_SHA384', 'FFA6')
define_custom_ciphersuite('SRP_SHA_ECDSA_WITH_AES_256_OCB_SHA384', 'FFA7')
- if options.include_eax:
+ if options.with_eax:
define_custom_ciphersuite('SRP_SHA_WITH_AES_256_EAX_SHA384', 'FFA8')
define_custom_ciphersuite('SRP_SHA_RSA_WITH_AES_256_EAX_SHA384', 'FFA9')
define_custom_ciphersuite('SRP_SHA_DSS_WITH_AES_256_EAX_SHA384', 'FFAA')
@@ -292,8 +290,8 @@ Ciphersuite Ciphersuite::by_id(u16bit suite)
}
"""
- if options.write_direct:
- out = open('lib/tls/tls_suite_info.cpp', 'w')
+ if options.output != None:
+ out = open(options.output, 'w')
out.write(suite_info)
out.close()
else: