Reason for revert:
This CL broke all Chromium WebRTC FYI bots. A roll+fix was attempted here: https://codereview.chromium.org/2590783003/, but failed to land. I'm reverting this CL now to make the tree green again. Make the API change gradual when you reland so that we can update Chromium between.
Original issue's description:
> Add disabled certificate check support to IceServer PeerConnection API.
>
> Refactor "OPT_SSLTCP" renaming it to "OPT_TLS_FAKE", making it clear
> that it's not actually some kind of SSL over TCP. Also making it clear
> that it's mutually exclusive with OPT_TLS.
>
> Add "OPT_TLS_INSECURE" that implements the new certificate-check
> disabled TLS mode, which is also mutually exclusive with the other
> TLS options.
>
> PortAllocator: Add a new TLS policy enum TlsCertPolicy which defines
> the new insecure mode and added it as a RelayCredentials member.
>
> TurnPort: Add new TLS policy member with appropriate getter and setter
> to avoid constructor bloat. Initialize it from the RelayCredentials
> after the TurnPort is created.
>
> Expose the new feature in the PeerConnection API via
> IceServer.tls_certificate_policy as well as via the Android JNI
> PeerConnection API.
>
> For security reasons we ensure that:
>
> 1) The policy is always explicitly initialized to secure.
> 2) API users have to explicitly integrate with the feature to
> use it, and will otherwise get no change in behavior.
> 3) The feature is not immediately exposed in non-native
> contexts. For example, disabling of certificate validation
> is not implemented via URI parsing since this would
> immediately allow it to be used from a web page.
>
> BUG=webrtc:6840
>
> Review-Url: https://codereview.webrtc.org/2557803002
> Cr-Commit-Position: refs/heads/master@{#15670}
> Committed: b0f04fdb9e
TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,hnsl@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6840
Review-Url: https://codereview.webrtc.org/2590153002
Cr-Commit-Position: refs/heads/master@{#15703}
60 lines
1.7 KiB
C++
60 lines
1.7 KiB
C++
/*
|
|
* Copyright 2011 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_
|
|
#define WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_
|
|
|
|
#include "webrtc/base/constructormagic.h"
|
|
#include "webrtc/base/proxyinfo.h"
|
|
|
|
namespace rtc {
|
|
|
|
class AsyncPacketSocket;
|
|
class AsyncResolverInterface;
|
|
|
|
class PacketSocketFactory {
|
|
public:
|
|
enum Options {
|
|
OPT_SSLTCP = 0x01, // Pseudo-TLS.
|
|
OPT_TLS = 0x02,
|
|
OPT_STUN = 0x04,
|
|
};
|
|
|
|
PacketSocketFactory() { }
|
|
virtual ~PacketSocketFactory() { }
|
|
|
|
virtual AsyncPacketSocket* CreateUdpSocket(const SocketAddress& address,
|
|
uint16_t min_port,
|
|
uint16_t max_port) = 0;
|
|
virtual AsyncPacketSocket* CreateServerTcpSocket(
|
|
const SocketAddress& local_address,
|
|
uint16_t min_port,
|
|
uint16_t max_port,
|
|
int opts) = 0;
|
|
|
|
// TODO: |proxy_info| and |user_agent| should be set
|
|
// per-factory and not when socket is created.
|
|
virtual AsyncPacketSocket* CreateClientTcpSocket(
|
|
const SocketAddress& local_address,
|
|
const SocketAddress& remote_address,
|
|
const ProxyInfo& proxy_info,
|
|
const std::string& user_agent,
|
|
int opts) = 0;
|
|
|
|
virtual AsyncResolverInterface* CreateAsyncResolver() = 0;
|
|
|
|
private:
|
|
RTC_DISALLOW_COPY_AND_ASSIGN(PacketSocketFactory);
|
|
};
|
|
|
|
} // namespace rtc
|
|
|
|
#endif // WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_
|