| Index: net/spdy/spdy_credential_builder.cc
|
| diff --git a/net/spdy/spdy_credential_builder.cc b/net/spdy/spdy_credential_builder.cc
|
| index accd33d9e2e10bac00e9617f78b36ade98d0e937..fd07d520f4ff9dc6cc3c821762cc4911e035f14f 100644
|
| --- a/net/spdy/spdy_credential_builder.cc
|
| +++ b/net/spdy/spdy_credential_builder.cc
|
| @@ -55,7 +55,7 @@ int SpdyCredentialBuilder::Build(const std::string& tls_unique,
|
| public_key = public_key.substr(2, public_key.length());
|
|
|
| // Convert the strings into a vector<unit8>
|
| - std::vector<uint8> proof_vector;
|
| + std::vector<uint8> der_signature;
|
| scoped_ptr<crypto::ECPrivateKey> private_key(
|
| crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
|
| ServerBoundCertService::kEPKIPassword,
|
| @@ -63,11 +63,17 @@ int SpdyCredentialBuilder::Build(const std::string& tls_unique,
|
| scoped_ptr<crypto::ECSignatureCreator> creator(
|
| crypto::ECSignatureCreator::Create(private_key.get()));
|
| creator->Sign(reinterpret_cast<const unsigned char *>(secret.data()),
|
| - secret.length(), &proof_vector);
|
| + secret.length(), &der_signature);
|
| +
|
| + std::string proof;
|
| + if (!creator->DecodeSignature(der_signature, &proof)) {
|
| + NOTREACHED();
|
| + return ERR_UNEXPECTED;
|
| + }
|
|
|
| credential->slot = slot;
|
| credential->certs.push_back(public_key.as_string());
|
| - credential->proof.assign(proof_vector.begin(), proof_vector.end());
|
| + credential->proof = proof;
|
| return OK;
|
| }
|
|
|
|
|