Skip to content

Commit

Permalink
Add missing types to RFC parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
lapo-luchini committed Apr 1, 2024
1 parent 6052316 commit 3bc6092
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 26 deletions.
7 changes: 5 additions & 2 deletions parseRFC.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
35 changes: 11 additions & 24 deletions rfcdef.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]
}
Expand Down Expand Up @@ -3382,8 +3380,7 @@ export const rfcdef = {
"name": "",
"type": {
"name": "GeneralizedTime",
"type": "builtin",
"content": "TODO:unknown"
"type": "builtin"
}
}
],
Expand All @@ -3400,8 +3397,7 @@ export const rfcdef = {
"name": "",
"type": {
"name": "GeneralizedTime",
"type": "builtin",
"content": "TODO:unknown"
"type": "builtin"
}
}
],
Expand Down Expand Up @@ -4494,8 +4490,7 @@ export const rfcdef = {
"name": "InvalidityDate",
"type": {
"name": "GeneralizedTime",
"type": "builtin",
"content": "TODO:unknown"
"type": "builtin"
}
}
}
Expand Down Expand Up @@ -5566,7 +5561,6 @@ export const rfcdef = {
"id": "date",
"name": "GeneralizedTime",
"type": "builtin",
"content": "TODO:unknown",
"optional": true
},
{
Expand Down Expand Up @@ -5629,7 +5623,6 @@ export const rfcdef = {
"id": "date",
"name": "GeneralizedTime",
"type": "builtin",
"content": "TODO:unknown",
"optional": true
},
{
Expand Down Expand Up @@ -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"
}
]
}
Expand Down Expand Up @@ -6664,8 +6655,7 @@ export const rfcdef = {
{
"id": "genTime",
"name": "GeneralizedTime",
"type": "builtin",
"content": "TODO:unknown"
"type": "builtin"
},
{
"id": "accuracy",
Expand Down Expand Up @@ -8345,8 +8335,7 @@ export const rfcdef = {
"name": "",
"type": {
"name": "GeneralizedTime",
"type": "builtin",
"content": "TODO:unknown"
"type": "builtin"
}
}
],
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 3bc6092

Please sign in to comment.