diff options
author | Damien Miller <djm@mindrot.org> | 2013-10-23 16:31:31 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2013-10-23 16:31:31 +1100 |
commit | 5b01b0dcb417eb615df77e7ce1b59319bf04342c (patch) | |
tree | 0b8547cffc23d295e8ed7a4160c18b77d0ce5688 | |
parent | eff5cada589f25793dbe63a76aba9da39837a148 (diff) |
- djm@cvs.openbsd.org 2013/10/23 04:16:22
[ssh-keygen.c]
Make code match documentation: relative-specified certificate expiry time
should be relative to current time and not the validity start time.
Reported by Petr Lautrbach; ok deraadt@
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-keygen.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -22,6 +22,11 @@ | |||
22 | - djm@cvs.openbsd.org 2013/10/23 03:05:19 | 22 | - djm@cvs.openbsd.org 2013/10/23 03:05:19 |
23 | [readconf.c ssh.c] | 23 | [readconf.c ssh.c] |
24 | comment | 24 | comment |
25 | - djm@cvs.openbsd.org 2013/10/23 04:16:22 | ||
26 | [ssh-keygen.c] | ||
27 | Make code match documentation: relative-specified certificate expiry time | ||
28 | should be relative to current time and not the validity start time. | ||
29 | Reported by Petr Lautrbach; ok deraadt@ | ||
25 | 30 | ||
26 | 20131018 | 31 | 20131018 |
27 | - (djm) OpenBSD CVS Sync | 32 | - (djm) OpenBSD CVS Sync |
diff --git a/ssh-keygen.c b/ssh-keygen.c index b8d55452d..b664a5f1f 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-keygen.c,v 1.234 2013/09/02 22:00:34 deraadt Exp $ */ | 1 | /* $OpenBSD: ssh-keygen.c,v 1.235 2013/10/23 04:16:22 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1743,7 +1743,7 @@ parse_cert_times(char *timespec) | |||
1743 | cert_valid_from = parse_absolute_time(from); | 1743 | cert_valid_from = parse_absolute_time(from); |
1744 | 1744 | ||
1745 | if (*to == '-' || *to == '+') | 1745 | if (*to == '-' || *to == '+') |
1746 | cert_valid_to = parse_relative_time(to, cert_valid_from); | 1746 | cert_valid_to = parse_relative_time(to, now); |
1747 | else | 1747 | else |
1748 | cert_valid_to = parse_absolute_time(to); | 1748 | cert_valid_to = parse_absolute_time(to); |
1749 | 1749 | ||