1 // Copyright 2019 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 PLATFORM_BASE_TLS_CREDENTIALS_H_ 6 #define PLATFORM_BASE_TLS_CREDENTIALS_H_ 7 8 #include <stdint.h> 9 10 #include <vector> 11 12 namespace openscreen { 13 14 struct TlsCredentials { 15 TlsCredentials(); 16 TlsCredentials(std::vector<uint8_t> der_rsa_private_key, 17 std::vector<uint8_t> der_rsa_public_key, 18 std::vector<uint8_t> der_x509_cert); 19 ~TlsCredentials(); 20 21 // DER-encoded RSA private key. 22 std::vector<uint8_t> der_rsa_private_key; 23 24 // DER-encoded RSA public key. 25 std::vector<uint8_t> der_rsa_public_key; 26 27 // DER-encoded X509 Certificate that is based on the above keys. 28 std::vector<uint8_t> der_x509_cert; 29 }; 30 31 } // namespace openscreen 32 33 #endif // PLATFORM_BASE_TLS_CREDENTIALS_H_ 34