blob: 3bdc0a1171e7e1207696672c259253cdce40ed1c [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef NET_SPDY_SPDY_CREDENTIAL_BUILDER_H_
6#define NET_SPDY_SPDY_CREDENTIAL_BUILDER_H_
7
8#include <string>
9
10#include "net/base/net_export.h"
Torne (Richard Coles)58218062012-11-14 11:43:16 +000011
12namespace net {
13
14class SSLClientSocket;
15struct SpdyCredential;
16
17// This class provides facilities for building the various fields of
18// SPDY CREDENTIAL frames.
19class NET_EXPORT_PRIVATE SpdyCredentialBuilder {
20 public:
21 static int Build(const std::string& tls_unique,
Torne (Richard Coles)58218062012-11-14 11:43:16 +000022 const std::string& key,
23 const std::string& cert,
24 size_t slot,
25 SpdyCredential* credential);
26
27 private:
28 friend class SpdyCredentialBuilderTest;
29
30 // Returns the secret data to be signed as part of a credential frame.
31 static std::string GetCredentialSecret(const std::string& tls_unique);
32};
33
34} // namespace net
35
36#endif // NET_SPDY_SPDY_CREDENTIAL_BUILDER_H_