diff options
author | djm@openbsd.org <djm@openbsd.org> | 2022-11-07 04:04:40 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2022-11-07 15:43:13 +1100 |
commit | a00f59a645072e5f5a8d207af15916a7b23e2642 (patch) | |
tree | 4bb417f3b375c45c8d8ff21b805e35e9cb197fc4 /ssh-keygen.c | |
parent | f58acaf8c7315483f4ac87d46a1aa2142a713cd8 (diff) | |
download | openssh-git-a00f59a645072e5f5a8d207af15916a7b23e2642.tar.gz |
upstream: fix parsing of hex cert expiry time; was checking whether the
start time began with "0x", not the expiry time.
from Ed Maste
OpenBSD-Commit-ID: 6269242c3e1a130b47c92cfca4d661df15f05739
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r-- | ssh-keygen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c index 9b2beda0..5469037a 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.459 2022/08/11 01:56:51 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.460 2022/11/07 04:04:40 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1975,7 +1975,7 @@ parse_cert_times(char *timespec) cert_valid_to = parse_relative_time(to, now); else if (strcmp(to, "forever") == 0) cert_valid_to = ~(u_int64_t)0; - else if (strncmp(from, "0x", 2) == 0) + else if (strncmp(to, "0x", 2) == 0) parse_hex_u64(to, &cert_valid_to); else if (parse_absolute_time(to, &cert_valid_to) != 0) fatal("Invalid to time \"%s\"", to); |