signature-params: Provide option for maximum RSA/PSS salt length
[strongswan.git] / src / libtncif / tncif_pa_subtypes.c
index 858308e..9c58944 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2010-2011 Andreas Steffen
- *
+ * Copyright (C) 2010-2017 Andreas Steffen
  * HSR Hochschule fuer Technik Rapperswil
  *
  * This program is free software; you can redistribute it and/or modify it
@@ -16,7 +15,8 @@
 
 #include "tncif_pa_subtypes.h"
 
-ENUM(ietf_pa_subtype_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_NEA_CLIENT,
+/* IETF PA Subtype names */
+ENUM_BEGIN(pa_subtype_ietf_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_SWIMA,
        "Testing",
        "Operating System",
        "Anti-Virus",
@@ -25,13 +25,77 @@ ENUM(ietf_pa_subtype_names, PA_SUBTYPE_IETF_TESTING, PA_SUBTYPE_IETF_NEA_CLIENT,
        "Firewall",
        "IDPS",
        "VPN",
-       "NEA Client"
+       "NEA Client",
+       "SWIMA"
+);
+ENUM_NEXT(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY, PA_SUBTYPE_IETF_ANY,
+                                                               PA_SUBTYPE_IETF_SWIMA,
+       "ANY"
 );
+ENUM_END(pa_subtype_ietf_names, PA_SUBTYPE_IETF_ANY);
 
-ENUM(pa_subtype_tcg_names, PA_SUBTYPE_TCG_PTS, PA_SUBTYPE_TCG_PTS,
-       "PTS"
+/* TCG PA Subtype names */
+ENUM_BEGIN(pa_subtype_tcg_names, PA_SUBTYPE_TCG_PTS, PA_SUBTYPE_TCG_SWID,
+       "PTS",
+       "SCAP",
+       "SWID"
 );
+ENUM_NEXT(pa_subtype_tcg_names, PA_SUBTYPE_TCG_ANY, PA_SUBTYPE_TCG_ANY,
+                                                               PA_SUBTYPE_TCG_SWID,
+       "ANY"
+);
+ENUM_END(pa_subtype_tcg_names, PA_SUBTYPE_TCG_ANY);
 
+/* PWG PA Subtype names */
+ENUM_BEGIN(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_TESTING,
+                                                                PA_SUBTYPE_PWG_HCD_UNKNOWN,
+       "HCD Testing",
+       "HCD Other",
+       "HCD Unknown"
+);
+ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_CONSOLE,
+                                                               PA_SUBTYPE_PWG_HCD_COVER,
+                                                               PA_SUBTYPE_PWG_HCD_UNKNOWN,
+       "HCD Console",
+       "HCD System",
+       "HCD Cover"
+);
+ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_INPUT_TRAY,
+                                                               PA_SUBTYPE_PWG_HCD_MARKER,
+                                                               PA_SUBTYPE_PWG_HCD_COVER,
+       "HCD Input Tray",
+       "HCD Output Tray",
+       "HCD Marker"
+);
+ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_MEDIA_PATH,
+                                                               PA_SUBTYPE_PWG_HCD_INTERPRETER,
+                                                               PA_SUBTYPE_PWG_HCD_MARKER,
+       "HCD Media Path",
+       "HCD Channel",
+       "HCD Interpreter"
+);
+ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_FINISHER,
+                                                               PA_SUBTYPE_PWG_HCD_FINISHER,
+                                                               PA_SUBTYPE_PWG_HCD_INTERPRETER,
+       "HCD Finisher"
+);
+ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_INTERFACE,
+                                                               PA_SUBTYPE_PWG_HCD_INTERFACE,
+                                                               PA_SUBTYPE_PWG_HCD_FINISHER,
+       "HCD Interface"
+);
+ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_HCD_SCANNER,
+                                                               PA_SUBTYPE_PWG_HCD_SCANNER,
+                                                               PA_SUBTYPE_PWG_HCD_INTERFACE,
+       "HCD Scanner"
+);
+ENUM_NEXT(pa_subtype_pwg_names, PA_SUBTYPE_PWG_ANY, PA_SUBTYPE_PWG_ANY,
+                                                               PA_SUBTYPE_PWG_HCD_SCANNER,
+       "ANY"
+);
+ENUM_END(pa_subtype_pwg_names, PA_SUBTYPE_PWG_ANY);
+
+/* FHH PA Subtype names */
 ENUM_BEGIN(pa_subtype_fhh_names, PA_SUBTYPE_FHH_HOSTSCANNER, PA_SUBTYPE_FHH_DUMMY,
        "HostScanner",
        "Dummy"
@@ -45,12 +109,22 @@ ENUM_NEXT(pa_subtype_fhh_names, PA_SUBTYPE_FHH_CLAMAV, PA_SUBTYPE_FHH_CLAMAV,
                                                                PA_SUBTYPE_FHH_ATTESTATION,
        "ClamAV"
 );
-ENUM_END(pa_subtype_fhh_names, PA_SUBTYPE_FHH_CLAMAV);
+ENUM_NEXT(pa_subtype_fhh_names, PA_SUBTYPE_FHH_ANY, PA_SUBTYPE_FHH_ANY,
+                                                               PA_SUBTYPE_FHH_CLAMAV,
+       "ANY"
+);
+ENUM_END(pa_subtype_fhh_names, PA_SUBTYPE_FHH_ANY);
 
-ENUM(pa_subtype_ita_names, PA_SUBTYPE_ITA_TEST, PA_SUBTYPE_ITA_SCANNER,
+/* ITA-HSR PA Subtype names */
+ENUM_BEGIN(pa_subtype_ita_names, PA_SUBTYPE_ITA_TEST, PA_SUBTYPE_ITA_ECHO,
        "Test",
-       "Scanner"
+       "Echo"
+);
+ENUM_NEXT(pa_subtype_ita_names, PA_SUBTYPE_ITA_ANY, PA_SUBTYPE_ITA_ANY,
+                                                               PA_SUBTYPE_ITA_ECHO,
+       "ANY"
 );
+ENUM_END(pa_subtype_ita_names, PA_SUBTYPE_ITA_ANY);
 
 /**
  * See header
@@ -60,9 +134,11 @@ enum_name_t* get_pa_subtype_names(pen_t pen)
        switch (pen)
        {
                case PEN_IETF:
-                       return pa_subtype_ita_names;
+                       return pa_subtype_ietf_names;
                case PEN_TCG:
                        return pa_subtype_tcg_names;
+               case PEN_PWG:
+                       return pa_subtype_pwg_names;
                case PEN_FHH:
                        return pa_subtype_fhh_names;
                case PEN_ITA: