summaryrefslogtreecommitdiffstats
path: root/content/common/ssl_status_serialization.h
blob: e3db1a2db673229cb6b874b2ae640776f912a9de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (c) 2012 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 CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_
#define CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_

#include <string>

#include "net/cert/cert_status_flags.h"

namespace content {

// Convenience methods for serializing/deserializing the security info.
std::string SerializeSecurityInfo(int cert_id,
                                  net::CertStatus cert_status,
                                  int security_bits,
                                  int connection_status);

bool DeserializeSecurityInfo(const std::string& state,
                             int* cert_id,
                             net::CertStatus* cert_status,
                             int* security_bits,
                             int* connection_status);

}  // namespace content

#endif  // CONTENT_COMMON_SSL_STATUS_SERIALIZATION_H_