Skip to content

Commit 522ee1b

Browse files
committed
schemas: lift up common SignatureTestVector def
1 parent cff7186 commit 522ee1b

7 files changed

+48
-167
lines changed

schemas/dsa_p1363_verify_schema_v1.json

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -34,52 +34,12 @@
3434
"tests": {
3535
"type": "array",
3636
"items": {
37-
"$ref": "#/definitions/SignatureTestVector"
37+
"$ref": "signatures_common.json#/definitions/SignatureTestVector"
3838
}
3939
}
4040
},
4141
"required": ["source"],
4242
"additionalProperties": false
43-
},
44-
"SignatureTestVector": {
45-
"type": "object",
46-
"properties": {
47-
"tcId": {
48-
"type": "integer",
49-
"description": "Identifier of the test case"
50-
},
51-
"comment": {
52-
"type": "string",
53-
"description": "A brief description of the test case"
54-
},
55-
"msg": {
56-
"type": "string",
57-
"format": "HexBytes",
58-
"description": "The message to sign"
59-
},
60-
"sig": {
61-
"type": "string",
62-
"format": "HexBytes",
63-
"description": "A signature for msg"
64-
},
65-
"result": {
66-
"type": "string",
67-
"description": "Test result",
68-
"enum": [
69-
"valid",
70-
"invalid",
71-
"acceptable"
72-
]
73-
},
74-
"flags": {
75-
"type": "array",
76-
"items": {
77-
"type": "string"
78-
},
79-
"description": "A list of flags"
80-
}
81-
},
82-
"additionalProperties": false
8343
}
8444
},
8545
"properties": {

schemas/dsa_verify_schema_v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"tests": {
3434
"type": "array",
3535
"items": {
36-
"$ref": "verify_common.json#/definitions/AsnSignatureTestVector"
36+
"$ref": "signatures_common.json#/definitions/AsnSignatureTestVector"
3737
}
3838
}
3939
},

schemas/ecdsa_p1363_verify_schema_v1.json

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -36,52 +36,12 @@
3636
"tests": {
3737
"type": "array",
3838
"items": {
39-
"$ref": "#/definitions/SignatureTestVector"
39+
"$ref": "signatures_common.json#/definitions/SignatureTestVector"
4040
}
4141
}
4242
},
4343
"required": ["source"],
4444
"additionalProperties": false
45-
},
46-
"SignatureTestVector": {
47-
"type": "object",
48-
"properties": {
49-
"tcId": {
50-
"type": "integer",
51-
"description": "Identifier of the test case"
52-
},
53-
"comment": {
54-
"type": "string",
55-
"description": "A brief description of the test case"
56-
},
57-
"msg": {
58-
"type": "string",
59-
"format": "HexBytes",
60-
"description": "The message to sign"
61-
},
62-
"sig": {
63-
"type": "string",
64-
"format": "HexBytes",
65-
"description": "A signature for msg"
66-
},
67-
"result": {
68-
"type": "string",
69-
"description": "Test result",
70-
"enum": [
71-
"valid",
72-
"invalid",
73-
"acceptable"
74-
]
75-
},
76-
"flags": {
77-
"type": "array",
78-
"items": {
79-
"type": "string"
80-
},
81-
"description": "A list of flags"
82-
}
83-
},
84-
"additionalProperties": false
8545
}
8646
},
8747
"properties": {

schemas/ecdsa_verify_schema_v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"tests": {
3434
"type": "array",
3535
"items": {
36-
"$ref": "verify_common.json#/definitions/AsnSignatureTestVector"
36+
"$ref": "signatures_common.json#/definitions/AsnSignatureTestVector"
3737
}
3838
}
3939
},

schemas/rsassa_pkcs1_generate_schema_v1.json

Lines changed: 2 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -59,53 +59,13 @@
5959
"tests": {
6060
"type": "array",
6161
"items": {
62-
"$ref": "#/definitions/SignatureTestVector"
62+
"$ref": "signatures_common.json#/definitions/SignatureTestVector"
6363
}
6464
}
6565
},
6666
"required": ["source", "privateKey", "keySize", "sha", "tests"],
6767
"additionalProperties": false
68-
},
69-
"SignatureTestVector": {
70-
"type": "object",
71-
"properties": {
72-
"tcId": {
73-
"type": "integer",
74-
"description": "Identifier of the test case"
75-
},
76-
"comment": {
77-
"type": "string",
78-
"description": "A brief description of the test case"
79-
},
80-
"msg": {
81-
"type": "string",
82-
"format": "HexBytes",
83-
"description": "The message to sign"
84-
},
85-
"sig": {
86-
"type": "string",
87-
"format": "HexBytes",
88-
"description": "A signature for msg"
89-
},
90-
"result": {
91-
"type": "string",
92-
"description": "Test result",
93-
"enum": [
94-
"valid",
95-
"invalid",
96-
"acceptable"
97-
]
98-
},
99-
"flags": {
100-
"type": "array",
101-
"items": {
102-
"type": "string"
103-
},
104-
"description": "A list of flags"
105-
}
106-
}
107-
},
108-
"additionalProperties": false
68+
}
10969
},
11070
"properties": {
11171
"algorithm": {

schemas/rsassa_pkcs1_verify_schema_v1.json

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -56,52 +56,12 @@
5656
"tests": {
5757
"type": "array",
5858
"items": {
59-
"$ref": "#/definitions/SignatureTestVector"
59+
"$ref": "signatures_common.json#/definitions/SignatureTestVector"
6060
}
6161
}
6262
},
6363
"required": ["source"],
6464
"additionalProperties": false
65-
},
66-
"SignatureTestVector": {
67-
"type": "object",
68-
"properties": {
69-
"tcId": {
70-
"type": "integer",
71-
"description": "Identifier of the test case"
72-
},
73-
"comment": {
74-
"type": "string",
75-
"description": "A brief description of the test case"
76-
},
77-
"msg": {
78-
"type": "string",
79-
"format": "HexBytes",
80-
"description": "The message to sign"
81-
},
82-
"sig": {
83-
"type": "string",
84-
"format": "HexBytes",
85-
"description": "A signature for msg"
86-
},
87-
"result": {
88-
"type": "string",
89-
"description": "Test result",
90-
"enum": [
91-
"valid",
92-
"invalid",
93-
"acceptable"
94-
]
95-
},
96-
"flags": {
97-
"type": "array",
98-
"items": {
99-
"type": "string"
100-
},
101-
"description": "A list of flags"
102-
}
103-
},
104-
"additionalProperties": false
10565
}
10666
},
10767
"properties": {
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,47 @@
4141
},
4242
"additionalProperties": false,
4343
"required": [ "tcId", "comment", "msg", "sig", "result", "flags"]
44+
},
45+
"SignatureTestVector": {
46+
"type": "object",
47+
"properties": {
48+
"tcId": {
49+
"type": "integer",
50+
"description": "Identifier of the test case"
51+
},
52+
"comment": {
53+
"type": "string",
54+
"description": "A brief description of the test case"
55+
},
56+
"msg": {
57+
"type": "string",
58+
"format": "HexBytes",
59+
"description": "The message to sign"
60+
},
61+
"sig": {
62+
"type": "string",
63+
"format": "HexBytes",
64+
"description": "A signature for msg"
65+
},
66+
"result": {
67+
"type": "string",
68+
"description": "Test result",
69+
"enum": [
70+
"valid",
71+
"invalid",
72+
"acceptable"
73+
]
74+
},
75+
"flags": {
76+
"type": "array",
77+
"items": {
78+
"type": "string"
79+
},
80+
"description": "A list of flags"
81+
}
82+
},
83+
"additionalProperties": false,
84+
"required": [ "tcId", "comment", "msg", "sig", "result", "flags"]
4485
}
4586
}
4687
}

0 commit comments

Comments
 (0)