use dtls::crypto::Certificate in Configuration
@@ -4,6 +4,8 @@ use crate::policy::ice_transport_policy::ICETransportPolicy;
use crate::policy::rtcp_mux_policy::RTCPMuxPolicy;
use crate::policy::sdp_policy::SdpPolicy;
+use dtls::crypto::Certificate;
+
/// A Configuration defines how peer-to-peer communication via PeerConnection
/// is established or re-established.
/// Configurations may be set up once and reused across multiple connections.
@@ -31,21 +33,22 @@ pub struct Configuration {
/// unless it can be successfully authenticated with the provided name.
peer_identity: String, //`json:"peerIdentity,omitempty"`
- // Certificates describes a set of certificates that the PeerConnection
- // uses to authenticate. Valid values for this parameter are created
- // through calls to the GenerateCertificate function. Although any given
- // DTLS connection will use only one certificate, this attribute allows the
- // caller to provide multiple certificates that support different
- // algorithms. The final certificate will be selected based on the DTLS
- // handshake, which establishes which certificates are allowed. The
- // PeerConnection implementation selects which of the certificates is
- // used for a given connection; how certificates are selected is outside
- // the scope of this specification. If this value is absent, then a default
- // set of certificates is generated for each PeerConnection instance.
- //TODO: certificates: Vec<Certificate>, //`json:"certificates,omitempty"`
+ /// Certificates describes a set of certificates that the PeerConnection
+ /// uses to authenticate. Valid values for this parameter are created
+ /// through calls to the GenerateCertificate function. Although any given
+ /// DTLS connection will use only one certificate, this attribute allows the
+ /// caller to provide multiple certificates that support different
+ /// algorithms. The final certificate will be selected based on the DTLS
+ /// handshake, which establishes which certificates are allowed. The
+ /// PeerConnection implementation selects which of the certificates is
+ /// used for a given connection; how certificates are selected is outside
+ /// the scope of this specification. If this value is absent, then a default
+ /// set of certificates is generated for each PeerConnection instance.
+ certificates: Vec<Certificate>, //`json:"certificates,omitempty"`
+
/// icecandidate_pool_size describes the size of the prefetched ICE pool.
- ice_candidate_pool_size: u8,
- // `json:"iceCandidatePoolSize,omitempty"`
+ ice_candidate_pool_size: u8, // `json:"iceCandidatePoolSize,omitempty"`
+
/// sdp_policy controls the type of SDP offers accepted by and
/// SDP answers generated by the PeerConnection.
sdp_policy: SdpPolicy, // `json:"sdpPolicy,omitempty"`
