コード例 #1
0
 public override TlsAuthentication GetAuthentication()
 {
     return(new TlsAuthenticationImplementor
            (
                getClientCredentials: (certRequest) =>
     {
         if (clientCredentials == null)
         {
             clientCredentials = new DefaultTlsSignerCredentials(mContext,
                                                                 CertificateInfo.certificate,
                                                                 CertificateInfo.keyPair.Private,
                                                                 new SignatureAndHashAlgorithm(HashAlgorithm.sha256, SignatureAlgorithm.ecdsa));
         }
         return clientCredentials;
     },
                notifyServerCertificate: (cert) => { ServerCertificateInfoAvailable?.Invoke(this, cert); }
            ));
 }
コード例 #2
0
ファイル: DtlsClient.cs プロジェクト: olivermertens/MeRTC
 private void TlsClient_ServerCertificateInfoAvailable(object sender, Certificate e)
 {
     ServerCertificateInfoAvailable?.Invoke(this, e);
 }