| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ | 5 #ifndef CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ |
| 6 #define CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ | 6 #define CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ |
| 7 | 7 |
| 8 #if !defined(USE_NSS_CERTS) && !defined(USE_OPENSSL_CERTS) |
| 9 #error "This file must be built with either USE_NSS_CERTS or USE_OPENSSL_CERTS." |
| 10 #else |
| 11 |
| 8 #include <stddef.h> | 12 #include <stddef.h> |
| 9 | 13 |
| 10 #include "net/cert/cert_type.h" | 14 #include "net/cert/cert_type.h" |
| 11 #include "net/cert/x509_certificate.h" | 15 #include "net/cert/x509_certificate.h" |
| 12 | 16 |
| 13 // This namespace defines a set of functions to be used in UI-related bits of | 17 // This namespace defines a set of functions to be used in UI-related bits of |
| 14 // X509 certificates. It decouples the UI from the underlying crypto library | 18 // X509 certificates. It decouples the UI from the underlying crypto library |
| 15 // (currently NSS or OpenSSL - in development). | 19 // (currently NSS or OpenSSL - in development). |
| 16 // This is currently only used by linux, as mac / windows use their own native | 20 // This is currently only used by linux, as mac / windows use their own native |
| 17 // certificate viewers and crypto libraries. | 21 // certificate viewers and crypto libraries. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 121 |
| 118 #if defined(USE_NSS_CERTS) | 122 #if defined(USE_NSS_CERTS) |
| 119 // Format a buffer as a space separated string, with 16 bytes on each line. | 123 // Format a buffer as a space separated string, with 16 bytes on each line. |
| 120 // |data_length| is the length in bits. | 124 // |data_length| is the length in bits. |
| 121 std::string ProcessRawBits(const unsigned char* data, | 125 std::string ProcessRawBits(const unsigned char* data, |
| 122 size_t data_length); | 126 size_t data_length); |
| 123 #endif // USE_NSS_CERTS | 127 #endif // USE_NSS_CERTS |
| 124 | 128 |
| 125 } // namespace x509_certificate_model | 129 } // namespace x509_certificate_model |
| 126 | 130 |
| 131 #endif // !defined(USE_NSS_CERTS) && !defined(USE_OPENSSL_CERTS) |
| 132 |
| 127 #endif // CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ | 133 #endif // CHROME_COMMON_NET_X509_CERTIFICATE_MODEL_H_ |
| OLD | NEW |