/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-ctl

  • Committer: Teddy Hogeborn
  • Date: 2013-10-20 19:13:09 UTC
  • Revision ID: teddy@recompile.se-20131020191309-7tyca3oo0zqxn45s
* mandos-keygen: Bug fix: Specify key usage to avoid creating keys
                 with key usage flags which GnuTLS does not like.
                 Also fix --help output documentation about default
                 subkey type.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
server_path = "/"
67
67
server_interface = domain + ".Mandos"
68
68
client_interface = domain + ".Mandos.Client"
69
 
version = "1.6.0"
 
69
version = "1.6.1"
70
70
 
71
71
def timedelta_to_milliseconds(td):
72
72
    """Convert a datetime.timedelta object to milliseconds"""
199
199
    >>> string_to_delta("5m 30s")
200
200
    datetime.timedelta(0, 330)
201
201
    """
202
 
    value = datetime.timedelta(0)
203
 
    regexp = re.compile(r"(\d+)([dsmhw]?)")
204
202
    
205
203
    try:
206
204
        return rfc3339_duration_to_delta(interval)
207
205
    except ValueError:
208
206
        pass
209
207
    
 
208
    value = datetime.timedelta(0)
 
209
    regexp = re.compile(r"(\d+)([dsmhw]?)")
 
210
    
210
211
    for num, suffix in regexp.findall(interval):
211
212
        if suffix == "d":
212
213
            value += datetime.timedelta(int(num))