Add support for ISO 8601 datetime format
[openssl.git] / apps / lib / apps.c
index 9aae725fc6d50a18115665f33d23aa8745909367..79fe4f8409e67b10a2329aef0008d0b03731e289 100644 (file)
@@ -1214,6 +1214,15 @@ int set_name_ex(unsigned long *flags, const char *arg)
     return 1;
 }
 
+int set_dateopt(unsigned long *dateopt, const char *arg)
+{
+    if (strcasecmp(arg, "rfc_822") == 0)
+        *dateopt = ASN1_DTFLGS_RFC822;
+    else if (strcasecmp(arg, "iso_8601") == 0)
+        *dateopt = ASN1_DTFLGS_ISO8601;
+    return 0;
+}
+
 int set_ext_copy(int *copy_type, const char *arg)
 {
     if (strcasecmp(arg, "none") == 0)