implemented ipsec listalgs as a stroke command
This commit is contained in:
@@ -200,6 +200,7 @@ static int show_status(stroke_keyword_t kw, char *connection)
|
||||
}
|
||||
|
||||
static int list_flags[] = {
|
||||
LIST_PUBKEYS,
|
||||
LIST_CERTS,
|
||||
LIST_CACERTS,
|
||||
LIST_OCSPCERTS,
|
||||
@@ -403,6 +404,7 @@ int main(int argc, char *argv[])
|
||||
case STROKE_STATUSALL:
|
||||
res = show_status(token->kw, argc > 2 ? argv[2] : NULL);
|
||||
break;
|
||||
case STROKE_LIST_PUBKEYS:
|
||||
case STROKE_LIST_CERTS:
|
||||
case STROKE_LIST_CACERTS:
|
||||
case STROKE_LIST_OCSPCERTS:
|
||||
|
||||
@@ -30,6 +30,7 @@ typedef enum {
|
||||
STROKE_LOGLEVEL,
|
||||
STROKE_STATUS,
|
||||
STROKE_STATUSALL,
|
||||
STROKE_LIST_PUBKEYS,
|
||||
STROKE_LIST_CERTS,
|
||||
STROKE_LIST_CACERTS,
|
||||
STROKE_LIST_OCSPCERTS,
|
||||
@@ -51,7 +52,7 @@ typedef enum {
|
||||
STROKE_PURGE_OCSP
|
||||
} stroke_keyword_t;
|
||||
|
||||
#define STROKE_LIST_FIRST STROKE_LIST_CERTS
|
||||
#define STROKE_LIST_FIRST STROKE_LIST_PUBKEYS
|
||||
#define STROKE_REREAD_FIRST STROKE_REREAD_SECRETS
|
||||
#define STROKE_PURGE_FIRST STROKE_PURGE_OCSP
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ down-srcip, STROKE_DOWN_SRCIP
|
||||
loglevel, STROKE_LOGLEVEL
|
||||
status, STROKE_STATUS
|
||||
statusall, STROKE_STATUSALL
|
||||
listpubkeys, STROKE_LIST_PUBKEYS
|
||||
listcerts, STROKE_LIST_CERTS
|
||||
listcacerts, STROKE_LIST_CACERTS
|
||||
listocspcerts, STROKE_LIST_OCSPCERTS
|
||||
|
||||
+13
-11
@@ -43,28 +43,30 @@ typedef enum list_flag_t list_flag_t;
|
||||
enum list_flag_t {
|
||||
/** don't list anything */
|
||||
LIST_NONE = 0x0000,
|
||||
/** list all raw public keys */
|
||||
LIST_PUBKEYS = 0x0001,
|
||||
/** list all host/user certs */
|
||||
LIST_CERTS = 0x0001,
|
||||
LIST_CERTS = 0x0002,
|
||||
/** list all ca certs */
|
||||
LIST_CACERTS = 0x0002,
|
||||
LIST_CACERTS = 0x0004,
|
||||
/** list all ocsp signer certs */
|
||||
LIST_OCSPCERTS = 0x0004,
|
||||
LIST_OCSPCERTS = 0x0008,
|
||||
/** list all aa certs */
|
||||
LIST_AACERTS = 0x0008,
|
||||
LIST_AACERTS = 0x0010,
|
||||
/** list all attribute certs */
|
||||
LIST_ACERTS = 0x0010,
|
||||
LIST_ACERTS = 0x0020,
|
||||
/** list all access control groups */
|
||||
LIST_GROUPS = 0x0020,
|
||||
LIST_GROUPS = 0x0040,
|
||||
/** list all ca information records */
|
||||
LIST_CAINFOS = 0x0040,
|
||||
LIST_CAINFOS = 0x0080,
|
||||
/** list all crls */
|
||||
LIST_CRLS = 0x0080,
|
||||
LIST_CRLS = 0x0100,
|
||||
/** list all ocsp cache entries */
|
||||
LIST_OCSP = 0x0100,
|
||||
LIST_OCSP = 0x0200,
|
||||
/** list all supported algorithms */
|
||||
LIST_ALGS = 0x0200,
|
||||
LIST_ALGS = 0x0400,
|
||||
/** all list options */
|
||||
LIST_ALL = 0x03FF,
|
||||
LIST_ALL = 0x07FF,
|
||||
};
|
||||
|
||||
typedef enum reread_flag_t reread_flag_t;
|
||||
|
||||
Reference in New Issue
Block a user