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

Side by Side Diff: chrome/renderer/resources/extensions/platform_keys/key.js

Issue 1840453002: [Extensions] More bindings hardening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var utils = require('utils'); 5 var utils = require('utils');
6 6
7 /** 7 /**
8 * Enum of possible key types (subset of WebCrypto.KeyType). 8 * Enum of possible key types (subset of WebCrypto.KeyType).
9 * @enum {string} 9 * @enum {string}
10 */ 10 */
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 */ 62 */
63 function getSpki(key) { 63 function getSpki(key) {
64 if (!privates(key)) 64 if (!privates(key))
65 throw new Error('Invalid key object.'); 65 throw new Error('Invalid key object.');
66 var keyImpl = privates(key).impl; 66 var keyImpl = privates(key).impl;
67 if (!keyImpl || !keyImpl.spki) 67 if (!keyImpl || !keyImpl.spki)
68 throw new Error('Invalid key object.'); 68 throw new Error('Invalid key object.');
69 return keyImpl.spki; 69 return keyImpl.spki;
70 } 70 }
71 71
72 exports.Key = Key; 72 exports.$set('Key', Key);
73 exports.KeyType = KeyType; 73 exports.$set('KeyType', KeyType);
74 exports.KeyUsage = KeyUsage; 74 exports.$set('KeyUsage', KeyUsage);
75 exports.getSpki = getSpki; 75 exports.$set('getSpki', getSpki);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698