Commit 77573ced authored by Daniel Salzman's avatar Daniel Salzman

patches: remove (obsolete)

parent 8c48b3bb
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = libtap src tests samples doc man patches
SUBDIRS = libtap src tests samples doc man
AM_DISTCHECK_CONFIGURE_FLAGS = \
--disable-code-coverage
......
......@@ -429,7 +429,6 @@ AC_CONFIG_FILES([Makefile
doc/Makefile
man/Makefile
samples/Makefile
patches/Makefile
libtap/Makefile
src/Makefile
tests/Makefile
......
EXTRA_DIST = strptime_susv3.patch
diff --git a/src/libknot/dnssec/key.c b/src/libknot/dnssec/key.c
index 7dc0540..3e351bb 100644
--- a/src/libknot/dnssec/key.c
+++ b/src/libknot/dnssec/key.c
@@ -260,7 +260,15 @@ static int key_param_time(const void *save_to, char *value)
struct tm parsed = { 0 };
- if (!strptime(value, "%Y%m%d%H%M%S", &parsed)) {
+ if (strlen(value) != 14) {
+ return KNOT_EINVAL;
+ }
+
+ char *v = value;
+ char buf[32] = "";
+ int ret = sprintf(buf, "%.4s %.2s %.2s %.2s %.2s %.2s",
+ v, v + 4, v + 6, v + 8, v + 10, v + 12);
+ if (ret != 19 || !strptime(buf, "%Y %m %d %H %M %S", &parsed)) {
return KNOT_EINVAL;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment