Reviewed By: passy Differential Revision: D17863711 fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
41 lines
915 B
C++
41 lines
915 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <folly/io/async/SSLContext.h>
|
|
#include <folly/dynamic.h>
|
|
#include "FlipperInitConfig.h"
|
|
|
|
using namespace folly;
|
|
|
|
namespace facebook {
|
|
namespace flipper {
|
|
|
|
class ConnectionContextStore {
|
|
|
|
public:
|
|
ConnectionContextStore(DeviceData deviceData);
|
|
bool hasRequiredFiles();
|
|
std::string getCertificateSigningRequest();
|
|
std::shared_ptr<SSLContext> getSSLContext();
|
|
std::string getCertificateDirectoryPath();
|
|
std::string getDeviceId();
|
|
void storeConnectionConfig(folly::dynamic& config);
|
|
|
|
private:
|
|
DeviceData deviceData_;
|
|
std::string csr = "";
|
|
|
|
std::string absoluteFilePath(const char* filename);
|
|
bool resetFlipperDir();
|
|
};
|
|
|
|
} // namespace flipper
|
|
} // namespace facebook
|