Ejemplo n.º 1
0
        /// <exception cref="System.IO.IOException"/>
        public static byte[] ReadCompressedByteArray(BinaryReader reader)
        {
            int length = @in.ReadInt();

            if (length == -1)
            {
                return(null);
            }
            byte[] buffer = new byte[length];
            @in.ReadFully(buffer);
            // could/should use readFully(buffer,0,length)?
            GZIPInputStream gzi = new GZIPInputStream(new ByteArrayInputStream(buffer, 0, buffer
                                                                               .Length));

            byte[] outbuf             = new byte[length];
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            int len;

            while ((len = gzi.Read(outbuf, 0, outbuf.Length)) != -1)
            {
                bos.Write(outbuf, 0, len);
            }
            byte[] decompressed = bos.ToByteArray();
            bos.Close();
            gzi.Close();
            return(decompressed);
        }
        public CertificatePinning()
        {
            try {
                byte[] keyStoreBytes = Base64.Decode("H4sICIgmj1QAA2RlZmF1bHRfY2xpZW50X3RydXN0c3RvcmUuYmtzAN2aB1hUSbbHu5scJYPEBsnxNjlKziAgOSg0uQlNBgkiGVGyIogEQQQkqICIZBBQkSw5KxkRyQiI+BpBZ5xxxp19b+ftbn8fH9x7q4qqW+d3zv+cahAIBAaBQGRZ6Z6OVGc7OSWfRLZm21bvX5JmaQSBsFjBIIiQIKoNbBL3Fivo8INhxCsEiIFAEBkgBCIJhIDvQohcq2boiIY5BB+LvvRHa6+qBwgwcTgjVCI+EIDBEAwQYA7DA3Aw0fTRMUkh+rowSoD88AKXlNDAxh2hi7BDckNVkVa8MBFA6PABHimvvBPcwwMqANX2snRCWEG13RHOcHdfqLyNuyfCFmEF90S4IKGyXp72Lu4IT1+AnpJATBiA8YsBXz4mlAT8ooAo6oaAkJiQmMm/fgLBmb9eMxgDhBYcAwKCoyDBwaBWM+OMdZorYLJHRJPoMqPThg8cFGXiwvDxegSGh4m73kOMGFg+cOYrYBS8Q2O4cCnjWmUqqODUxYGi8GwrxefubO2bGs+83F6JrWjJrXpN4sY/i4W6pJzYKTpl7sohnNMaMV+SCm3TvRs+L1V3MfWAWVFgzJt8+US2m7WGDW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s8wZJH3J18bwNDnUFpsv6Vp9gTJfvlLyKsnUwVNcLp0577kKpYopgtz2/CYNY/2ouQVdM9q36auWFHh5reb4qxNPvTsffHBY35PNzRYga531s+rNsBTpD7fJIJzTZfakOU9Homv6nHs+VFWC/P4V+0rD5D9M0onJbjQWJmJ/kOZrLT2YMcm0nhhl1Iq4KegtbDjeTc7XUnyJnEHE0uN037x5JyXaqNAe1+h9CxxzevM4ZDWe1FsTUnp8C5fyhvJTTLxYeG33PNuUq+kaB+86tvO9kvukOp4X1aVbNQIyYa8PmdypIqXTjgj5FAvEcSg9pJcSGhG1pKBSK557rOM08cByCdxNz3zgF0dCTWL/5KPtTTIyRbP78/cRlMFcJiKt5zk3n01lmendytUDda2uNT5PAaglhClG7yDffioufTqyAlEmvdKwVgYr1qJ9o5X24AR++ocLBEObQgZBIxXOlHHp9MHWbw5aFKuKHStx/c5oqYe9V1+7OE4MqsDje/kgd8n78wklKwDo8r7rc1X0fwBxS2vGpDgAAA==", 0);

                KeyStore keyStore         = KeyStore.GetInstance("BKS");
                System.IO.MemoryStream ms = new System.IO.MemoryStream(keyStoreBytes);
                GZIPInputStream        keyStoreInputStream = new GZIPInputStream(ms);
                //var readbytes = keyStoreInputStream.ToArray<byte>();

                List <byte> values = new List <byte>();

                bool notdone = true;
                while (notdone)
                {
                    var input = keyStoreInputStream.Read();
                    if (input < 0 || input > 255)
                    {
                        break;
                    }
                    values.Add((byte)input);
                }
                try {
                    keyStore.Load(new System.IO.MemoryStream(values.ToArray()), null);
                } finally {
                    keyStoreInputStream.Close();
                }
                TRUST_STORE = keyStore;

                String algorithm = TrustManagerFactory.DefaultAlgorithm;
                TrustManagerFactory trustManagerFactory = TrustManagerFactory.GetInstance(algorithm);
                trustManagerFactory.Init(keyStore);

                SSLContext context = SSLContext.GetInstance("TLS");
                context.Init(null, trustManagerFactory.GetTrustManagers(), null);
                SSL_CONTEXT = context;
            } catch (Exception e) {
            }
        }