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

Unified Diff: net/cert/jwk_serializer.h

Issue 21561003: Add a utility method to convert SPKI from DER to JWK, so far implemented only for EC P256v1 (which … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@domain-bound-public-key
Patch Set: s/uint8_t/unsigned char/g, for windows compile Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/cert/jwk_serializer_nss.cc » ('j') | net/cert/jwk_serializer_nss.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/jwk_serializer.h
diff --git a/net/cert/jwk_serializer.h b/net/cert/jwk_serializer.h
new file mode 100644
index 0000000000000000000000000000000000000000..629ecf354aa0bad2116ba540769d46aad1583bec
--- /dev/null
+++ b/net/cert/jwk_serializer.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_CERT_JWK_SERIALIZER_H_
+#define NET_CERT_JWK_SERIALIZER_H_
+
+#include "base/strings/string_piece.h"
+#include "net/base/net_export.h"
+
+namespace base {
+class DictionaryValue;
+}
+
+namespace net {
+
+namespace JwkSerializer {
+
+// Converts a subject public key info from DER to JWK.
+// See http://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-13 for
+// the output format.
+NET_EXPORT_PRIVATE bool ConvertSpkiFromDerToJwk(
+ const base::StringPiece& spki_der,
+ base::DictionaryValue* public_key_jwk);
+
+} // namespace JwkSerializer
+
+} // namespace net
+
+#endif // NET_CERT_JWK_SERIALIZER_H_
« no previous file with comments | « no previous file | net/cert/jwk_serializer_nss.cc » ('j') | net/cert/jwk_serializer_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698