Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: content/test/data/webcrypto/bad_rsa_keys.json

Issue 685063007: Check trailing data when parsing ASN.1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/webcrypto/openssl/util_openssl.cc ('k') | crypto/rsa_private_key_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // This file contains incorrect key data in a variety of formats. 1 // This file contains incorrect key data in a variety of formats.
2 // "key" -- either a dictionary for JWK, or hex encoded bytes for PKCS8/SPKI. 2 // "key" -- either a dictionary for JWK, or hex encoded bytes for PKCS8/SPKI.
3 // "key_format" -- one of: "jwk", "pkcs8", "spki" 3 // "key_format" -- one of: "jwk", "pkcs8", "spki"
4 // "error" -- The expected rejection reason when importing the key. 4 // "error" -- The expected rejection reason when importing the key.
5 [ 5 [
6 6
7 // This is a valid key (ValidKey). It forms the basis for later manipulations 7 // This is a valid key (ValidKey). It forms the basis for later manipulations
8 // so its validity is tested separatelty. 8 // so its validity is tested separatelty.
9 { 9 {
10 "key_format": "jwk", 10 "key_format": "jwk",
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 "key_format": "pkcs8", 222 "key_format": "pkcs8",
223 "key": "308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B020101 04201FE33950C5F461124AE992C2BDFDF1C73B1615F571BD567E60D19AA1F48CDF42A14403420004 7C110C66DCFDA807F6E69E45DDB3C74F69A1484D203E8DC5ADA8E9A9DD7CB3C70DF448986E51BDE5 D1576F99901F9C2C6A806A47FD907643A72B835597EFC8C6", 223 "key": "308187020100301306072A8648CE3D020106082A8648CE3D030107046D306B020101 04201FE33950C5F461124AE992C2BDFDF1C73B1615F571BD567E60D19AA1F48CDF42A14403420004 7C110C66DCFDA807F6E69E45DDB3C74F69A1484D203E8DC5ADA8E9A9DD7CB3C70DF448986E51BDE5 D1576F99901F9C2C6A806A47FD907643A72B835597EFC8C6",
224 "error": "DataError" 224 "error": "DataError"
225 }, 225 },
226 226
227 // Valid SPKI, however it defines an EC key not an RSA key. 227 // Valid SPKI, however it defines an EC key not an RSA key.
228 { 228 {
229 "key_format": "spki", 229 "key_format": "spki",
230 "key": "3059301306072A8648CE3D020106082A8648CE3D030107034200049CB0CF69303DAF C761D4E4687B4ECF039E6D34AB964AF80810D8D558A4A8D6F72D51233A1788920A86EE08A1962C79 EFA317FB7879E297DAD2146DB995FA1C78", 230 "key": "3059301306072A8648CE3D020106082A8648CE3D030107034200049CB0CF69303DAF C761D4E4687B4ECF039E6D34AB964AF80810D8D558A4A8D6F72D51233A1788920A86EE08A1962C79 EFA317FB7879E297DAD2146DB995FA1C78",
231 "error": "DataError" 231 "error": "DataError"
232 },
233
234 // PKCS8 with extra data after it.
235 {
236 "key_format": "pkcs8",
237 "key": "30820275020100300D06092A864886F70D01010105000482025F3082025B02010002 818100A56E4A0E701017589A5187DC7EA841D156F2EC0E36AD52A44DFEB1E61F7AD991D8C51056FF EDB162B4C0F283A12A88A394DFF526AB7291CBB307CEABFCE0B1DFD5CD9508096D5B2B8B6DF5D671 EF6377C0921CB23C270A70E2598E6FF89D19F105ACC2D3F0CB35F29280E1386B6F64C4EF22E1E1F2 0D0CE8CFFB2249BD9A2137020301000102818033A5042A90B27D4F5451CA9BBBD0B44771A101AF88 4340AEF9885F2A4BBE92E894A724AC3C568C8F97853AD07C0266C8C6A3CA0929F1E8F11231884429 FC4D9AE55FEE896A10CE707C3ED7E734E44727A39574501A532683109C2ABACABA283C31B4BD2F53 C3EE37E352CEE34F9E503BD80C0622AD79C6DCEE883547C6A3B325024100E7E8942720A877517273 A356053EA2A1BC0C94AA72D55C6E86296B2DFC967948C0A72CBCCCA7EACB35706E09A1DF55A1535B D9B3CC34160B3B6DCD3EDA8E6443024100B69DCA1CF7D4D7EC81E75B90FCCA874ABCDE123FD27001 80AA90479B6E48DE8D67ED24F9F19D85BA275874F542CD20DC723E6963364A1F9425452B269A6799 FD024028FA13938655BE1F8A159CBACA5A72EA190C30089E19CD274A556F36C4F6E19F554B34C077 790427BBDD8DD3EDE2448328F385D81B30E8E43B2FFFA02786197902401A8B38F398FA712049898D 7FB79EE0A77668791299CDFA09EFC0E507ACB21ED74301EF5BFD48BE455EAEB6E1678255827580A8 E4E8E14151D1510A82A3F2E729024027156ABA4126D24A81F3A528CBFB27F56886F840A9F6E86E17 A44B94FE9319584B8E22FDDE1E5A2E3BD8AA5BA8D8584194EB2190ACF832B847F13A3D24A79F4D00 000000",
238 "error": "DataError"
239 },
240
241 // SPKI with extra data after it.
242 {
243 "key_format": "spki",
244 "key": "30819F300D06092A864886F70D010101050003818D0030818902818100A56E4A0E70 1017589A5187DC7EA841D156F2EC0E36AD52A44DFEB1E61F7AD991D8C51056FFEDB162B4C0F283A1 2A88A394DFF526AB7291CBB307CEABFCE0B1DFD5CD9508096D5B2B8B6DF5D671EF6377C0921CB23C 270A70E2598E6FF89D19F105ACC2D3F0CB35F29280E1386B6F64C4EF22E1E1F20D0CE8CFFB2249BD 9A2137020301000100000000",
245 "error": "DataError"
232 } 246 }
233 ] 247 ]
OLDNEW
« no previous file with comments | « content/child/webcrypto/openssl/util_openssl.cc ('k') | crypto/rsa_private_key_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698