Ejemplo n.º 1
0
        public unsafe Task <QuicSecurityConfiguration> CreateSecurityConfiguration(ReadOnlySpan <byte> hash)
        {
#pragma warning disable CA1303 // Do not pass literals as localized parameters
            if (hash.Length != 20)
            {
                throw new ArgumentOutOfRangeException(nameof(hash), "Hash must be 20 bytes long");
            }
#pragma warning restore CA1303 // Do not pass literals as localized parameters

            var nativeHash = new QuicNativeCertificateHash();
            hash.CopyTo(new Span <byte>(nativeHash.ShaHash, 20));


            return(QuicSecurityConfiguration.CreateQuicSecurityConfig(m_nativeApi, this, nativeHash, null, false));
        }
Ejemplo n.º 2
0
 public unsafe Task <QuicSecurityConfiguration> CreateSecurityConfiguration(string certFile, string keyName)
 {
     return(QuicSecurityConfiguration.CreateQuicSecurityConfig(m_nativeApi, this, certFile, keyName, false));
 }
Ejemplo n.º 3
0
 public unsafe Task <QuicSecurityConfiguration> CreateSecurityConfiguration(X509Certificate certificate)
 {
     return(QuicSecurityConfiguration.CreateQuicSecurityConfig(m_nativeApi, this, certificate));
 }
Ejemplo n.º 4
0
 public unsafe Task <QuicSecurityConfiguration> CreateSecurityConfiguration()
 {
     return(QuicSecurityConfiguration.CreateQuicSecurityConfig(m_nativeApi, this));
 }