viff

changeset 682:74f54302aeb0

Auto-detect if we can use TLS or not.
author Martin Geisler <mg@daimi.au.dk>
date Fri, 25 Apr 2008 10:03:36 +0200
parents 12f075bee231
children 95a26f4d2a9e
files viff/runtime.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/viff/runtime.py	Fri Apr 25 09:49:28 2008 +0200
     1.2 +++ b/viff/runtime.py	Fri Apr 25 10:03:36 2008 +0200
     1.3 @@ -428,9 +428,15 @@
     1.4          group.add_option("--deferred-debug", action="store_true",
     1.5                           help="Enable extra debug output for deferreds.")
     1.6  
     1.7 +        try:
     1.8 +            import gnutls
     1.9 +            have_gnutls = True
    1.10 +        except ImportError:
    1.11 +            have_gnutls = False
    1.12 +
    1.13          parser.set_defaults(bit_length=32,
    1.14                              security_parameter=30,
    1.15 -                            tls=True,
    1.16 +                            tls=have_gnutls,
    1.17                              deferred_debug=False)
    1.18  
    1.19      def __init__(self, player, threshold, options=None):