From 3bc60924b7f16e9e3f7ed5a35b161f2c0b581a6d Mon Sep 17 00:00:00 2001 From: Lapo Luchini Date: Mon, 1 Apr 2024 11:03:15 +0000 Subject: [PATCH] Add missing types to RFC parser. --- parseRFC.js | 7 +++++-- rfcdef.js | 35 +++++++++++------------------------ 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/parseRFC.js b/parseRFC.js index 4e592f8..5bd6912 100755 --- a/parseRFC.js +++ b/parseRFC.js @@ -288,12 +288,15 @@ class Parser { this.expectToken(')'); } break; + case 'UTCTime': + case 'GeneralizedTime': + break; default: - x.content = 'TODO:unknown'; + x.warning = 'type unknown'; } } catch (e) { console.log('[debug] parseBuiltinType content', e); - x.content = 'TODO:exception'; + x.warning = 'type exception'; } return x; } diff --git a/rfcdef.js b/rfcdef.js index 809be54..7f6d59f 100644 --- a/rfcdef.js +++ b/rfcdef.js @@ -1606,14 +1606,12 @@ export const rfcdef = { { "id": "utcTime", "name": "UTCTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" }, { "id": "generalTime", "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" } ] } @@ -3382,8 +3380,7 @@ export const rfcdef = { "name": "", "type": { "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" } } ], @@ -3400,8 +3397,7 @@ export const rfcdef = { "name": "", "type": { "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" } } ], @@ -4494,8 +4490,7 @@ export const rfcdef = { "name": "InvalidityDate", "type": { "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" } } } @@ -5566,7 +5561,6 @@ export const rfcdef = { "id": "date", "name": "GeneralizedTime", "type": "builtin", - "content": "TODO:unknown", "optional": true }, { @@ -5629,7 +5623,6 @@ export const rfcdef = { "id": "date", "name": "GeneralizedTime", "type": "builtin", - "content": "TODO:unknown", "optional": true }, { @@ -6142,14 +6135,12 @@ export const rfcdef = { { "id": "utcTime", "name": "UTCTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" }, { "id": "generalTime", "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" } ] } @@ -6664,8 +6655,7 @@ export const rfcdef = { { "id": "genTime", "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" }, { "id": "accuracy", @@ -8345,8 +8335,7 @@ export const rfcdef = { "name": "", "type": { "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" } } ], @@ -9649,14 +9638,12 @@ export const rfcdef = { { "id": "willBeRevokedAt", "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" }, { "id": "badSinceDate", "name": "GeneralizedTime", - "type": "builtin", - "content": "TODO:unknown" + "type": "builtin" }, { "id": "crlDetails",