| 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 NET_BASE_X509_UTIL_H_ | 5 #ifndef NET_BASE_X509_UTIL_H_ |
| 6 #define NET_BASE_X509_UTIL_H_ | 6 #define NET_BASE_X509_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // Creates an origin bound certificate containing the public key in |key|. | 23 // Creates an origin bound certificate containing the public key in |key|. |
| 24 // Web origin, serial number and validity period are given as | 24 // Web origin, serial number and validity period are given as |
| 25 // parameters. The certificate is signed by the private key in |key|. | 25 // parameters. The certificate is signed by the private key in |key|. |
| 26 // The hashing algorithm for the signature is SHA-1. | 26 // The hashing algorithm for the signature is SHA-1. |
| 27 // | 27 // |
| 28 // See Internet Draft draft-balfanz-tls-obc-00 for more details: | 28 // See Internet Draft draft-balfanz-tls-obc-00 for more details: |
| 29 // http://tools.ietf.org/html/draft-balfanz-tls-obc-00 | 29 // http://tools.ietf.org/html/draft-balfanz-tls-obc-00 |
| 30 bool NET_EXPORT_PRIVATE CreateOriginBoundCertRSA(crypto::RSAPrivateKey* key, | 30 bool NET_EXPORT_PRIVATE CreateOriginBoundCertRSA(crypto::RSAPrivateKey* key, |
| 31 const std::string& origin, | 31 const std::string& origin, |
| 32 uint32 serial_number, | 32 uint32 serial_number, |
| 33 base::TimeDelta valid_duration, | 33 base::Time not_valid_before, |
| 34 base::Time not_valid_after, |
| 34 std::string* der_cert); | 35 std::string* der_cert); |
| 35 bool NET_EXPORT_PRIVATE CreateOriginBoundCertEC(crypto::ECPrivateKey* key, | 36 bool NET_EXPORT_PRIVATE CreateOriginBoundCertEC(crypto::ECPrivateKey* key, |
| 36 const std::string& origin, | 37 const std::string& origin, |
| 37 uint32 serial_number, | 38 uint32 serial_number, |
| 38 base::TimeDelta valid_duration, | 39 base::Time not_valid_before, |
| 40 base::Time not_valid_after, |
| 39 std::string* der_cert); | 41 std::string* der_cert); |
| 40 | 42 |
| 41 } // namespace x509_util | 43 } // namespace x509_util |
| 42 | 44 |
| 43 } // namespace net | 45 } // namespace net |
| 44 | 46 |
| 45 #endif // NET_BASE_X509_UTIL_H_ | 47 #endif // NET_BASE_X509_UTIL_H_ |
| OLD | NEW |