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

Unified Diff: net/cert/jwk_serializer_nss.cc

Issue 22731002: Improve style of JWK serializer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/jwk_serializer_nss.cc
diff --git a/net/cert/jwk_serializer_nss.cc b/net/cert/jwk_serializer_nss.cc
index 0259c5c515ca048e67df92c1e22898344805acf3..d8445805f8e3b7d10e8241c3ca7fe9ce94fda307 100644
--- a/net/cert/jwk_serializer_nss.cc
+++ b/net/cert/jwk_serializer_nss.cc
@@ -22,12 +22,12 @@ namespace {
bool ConvertEcPrime256v1PublicKeyInfoToJwk(
CERTSubjectPublicKeyInfo* spki,
base::DictionaryValue* public_key_jwk) {
- static const int kPrime256v1EncodingType = 4;
+ static const int kUncompressedEncodingType = 4;
static const int kPrime256v1PublicKeyLength = 64;
// The public key value is encoded as 0x04 + 64 bytes of public key.
// NSS gives the length as the bit length.
if (spki->subjectPublicKey.len != (kPrime256v1PublicKeyLength + 1) * 8 ||
- spki->subjectPublicKey.data[0] != kPrime256v1EncodingType)
+ spki->subjectPublicKey.data[0] != kUncompressedEncodingType)
return false;
public_key_jwk->SetString("alg", "EC");
« no previous file with comments | « no previous file | net/cert/jwk_serializer_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698