Files
flipper/xplat/Flipper/FlipperCertificateProvider.h
Pritesh Nandgaonkar f626925443 Upload/Download certs zip from Flipper
Summary:
This diff adds upload and download logic for certs. It makes changes on both Flipper Client and Desktop side. With this we enable cert exchange through WWW.

Next Diffs:

1) Add Flipper state in cert provider for more debug data
2) Tests

Reviewed By: jknoxville

Differential Revision: D23092706

fbshipit-source-id: e576253606b64b62848b70203db7e09a3bd77fd9
2020-08-17 06:51:52 -07:00

51 lines
1.2 KiB
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 <functional>
#include <string>
#include "FlipperCertificateExchangeMedium.h"
namespace facebook {
namespace flipper {
/**
* Represents a FlipperCertificateProvider which is responsible for obtaining
* Flipper TLS certificates.
*/
class FlipperCertificateProvider {
public:
virtual ~FlipperCertificateProvider() {}
/**
* Gets certificates downloaded at a path, which is passed as an argument.
*/
virtual void getCertificates(
const std::string& path,
const std::string& deviceID) = 0;
/**
* Sets certificate exchange medium
*/
virtual void setCertificateExchangeMedium(
const FlipperCertificateExchangeMedium medium) = 0;
/**
* Gets certificate exchange medium
*/
virtual FlipperCertificateExchangeMedium getCertificateExchangeMedium() = 0;
/**
* This lets the Client know if it should reset the connection folder when
* `stop` is called.
*/
virtual bool shouldResetCertificateFolder() = 0;
};
} // namespace flipper
} // namespace facebook