コード例 #1
0
        public override string chooseClientAlias(string[] keyType, jvm::java.security.Principal[] issuers, jvm::java.net.Socket socket)
        {
            Console.WriteLine("chooseClientAlias ");



            // client does not have an alies does it?
            return(this.InternalX509KeyManager.chooseClientAlias(keyType, issuers, socket));
        }
コード例 #2
0
        // the alias name of a matching key or null if there are no matches.
        // Chooses an alias for the server side of an SSL connection to authenticate it with the specified public key type and certificate issuers.
        public override string chooseServerAlias(string keyType, jvm::java.security.Principal[] issuers, jvm::java.net.Socket socket)
        {
            if (keyType != "RSA")
            {
                return(null);
            }

            // chooseServerAlias { keyType = EC_EC }
            //Console.WriteLine("chooseServerAlias " + new { keyType });

            //if (issuers != null)
            //    foreach (var issuer in issuers)
            //    {
            //        Console.WriteLine("chooseServerAlias " + new { keyType, issuer });
            //    }

            // { aliasKey = 192.168.1.12, SerialNumber = c7ef5d7ff74627934e4f863f4a766a89, SimpleName = 192.168.1.12, Issuer = issuer }

            //return "192.168.1.12";
            return(alias);
        }