[BTLS]: Remove some debugging methods.
authorMartin Baulig <martin.baulig@xamarin.com>
Fri, 30 Sep 2016 15:02:01 +0000 (17:02 +0200)
committerMartin Baulig <martin.baulig@xamarin.com>
Fri, 30 Sep 2016 15:11:09 +0000 (17:11 +0200)
12 files changed:
mcs/class/System/Mono.Btls/MonoBtlsKey.cs
mcs/class/System/Mono.Btls/MonoBtlsSsl.cs
mcs/class/System/Mono.Btls/MonoBtlsX509Crl.cs
mcs/class/System/Mono.Btls/MonoBtlsX509StoreCtx.cs
mcs/class/System/Mono.Btls/X509ChainImplBtls.cs
mono/btls/btls-key.c
mono/btls/btls-key.h
mono/btls/btls-ssl.c
mono/btls/btls-ssl.h
mono/btls/btls-x509-store-ctx.c
mono/btls/btls-x509-store-ctx.h
mono/metadata/icall-def.h

index d7c802df359b417198be9f72761c0c76961cb97b..e3e3defe7ff3f2a41da4d6896ac4368114b67564 100644 (file)
@@ -63,9 +63,6 @@ namespace Mono.Btls
                [MethodImpl (MethodImplOptions.InternalCall)]
                extern static int mono_btls_key_is_rsa (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
-               extern static int mono_btls_key_test (IntPtr handle);
-
                new internal BoringKeyHandle Handle {
                        get { return (BoringKeyHandle)base.Handle; }
                }
@@ -89,11 +86,6 @@ namespace Mono.Btls
                        return buffer;
                }
 
-               public void Test ()
-               {
-                       mono_btls_key_test (Handle.DangerousGetHandle ());
-               }
-
                public MonoBtlsKey Copy ()
                {
                        CheckThrow ();
index a9b5d87e935ef86973d0a4154a4430cc8cb66a55..933239de69b2ac6429cae2b7c80dfe47e8e1c9cb 100644 (file)
@@ -94,9 +94,6 @@ namespace Mono.Btls
                [MethodImpl (MethodImplOptions.InternalCall)]
                extern static int mono_btls_ssl_get_error (IntPtr handle, int ret_code);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
-               extern static void mono_btls_ssl_test (IntPtr handle);
-
                [MethodImpl (MethodImplOptions.InternalCall)]
                extern static int mono_btls_ssl_get_version (IntPtr handle);
 
@@ -394,12 +391,6 @@ namespace Mono.Btls
                        CheckError (ret);
                }
 
-               public void Test ()
-               {
-                       CheckThrow ();
-                       mono_btls_ssl_test (Handle.DangerousGetHandle ());
-               }
-
                protected override void Close ()
                {
                        mono_btls_ssl_close (Handle.DangerousGetHandle ());
index 9b8a64f67b909252fbe22af5ea5b98a49c9b7481..7b4ab7d8c9a6523d20891d42ed39462b12921dd9 100644 (file)
@@ -70,9 +70,6 @@ namespace Mono.Btls
                [MethodImpl (MethodImplOptions.InternalCall)]
                extern static IntPtr mono_btls_x509_crl_ref (IntPtr handle);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
-               extern static void mono_btls_x509_crl_test (IntPtr handle);
-
                [MethodImpl (MethodImplOptions.InternalCall)]
                extern static IntPtr mono_btls_x509_crl_from_data (IntPtr data, int len, MonoBtlsX509Format format);
 
index affb9883a02cb621bae65c7e8e4f2e4703546016..41df1298f9cb8758fb96a75471de876dfc65b5ec 100644 (file)
@@ -87,9 +87,6 @@ namespace Mono.Btls
                [MethodImpl (MethodImplOptions.InternalCall)]
                extern static int mono_btls_x509_store_ctx_set_param (IntPtr handle, IntPtr param);
 
-               [MethodImpl (MethodImplOptions.InternalCall)]
-               extern static void mono_btls_x509_store_ctx_test (IntPtr handle);
-
                [MethodImpl (MethodImplOptions.InternalCall)]
                extern static int mono_btls_x509_store_ctx_verify_cert (IntPtr handle);
 
@@ -172,11 +169,6 @@ namespace Mono.Btls
                        return new MonoBtlsX509Chain (new MonoBtlsX509Chain.BoringX509ChainHandle (chain));
                }
 
-               public void Test ()
-               {
-                       mono_btls_x509_store_ctx_test (Handle.DangerousGetHandle ());
-               }
-
                public void Initialize (MonoBtlsX509Store store, MonoBtlsX509Chain chain)
                {
                        var ret = mono_btls_x509_store_ctx_init (
index 81fe569645b21d61112e6f6c0b61a188bae7d97a..79a985ce6749562f1871b38961e1ebee4faeafe6 100644 (file)
@@ -55,9 +55,6 @@ namespace Mono.Btls
                        this.chain = storeCtx.GetChain ();
 
                        policy = new X509ChainPolicy ();
-                       using (var test = (IDisposable)null) {
-                               ;
-                       }
 
                        untrustedChain = storeCtx.GetUntrusted ();
 
@@ -70,7 +67,6 @@ namespace Mono.Btls
                                                untrusted.Add (new X509Certificate2 (impl));
                                }
                        }
-                       storeCtx.Test ();
                }
 
                internal X509ChainImplBtls ()
index 708abe4cfbbf951bab327ce3a8f1a3d605b6b5c0..756f9c75649a4b1c0fbb8f2ddd5d7398004f97ce 100644 (file)
@@ -60,24 +60,3 @@ mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int includ
        *size = (int)len;
        return 1;
 }
-
-int
-mono_btls_key_test (EVP_PKEY *pkey)
-{
-       RSA *rsa;
-       unsigned char *p = NULL;
-       int ret;
-
-       if (pkey->type != EVP_PKEY_RSA)
-               return 0;
-
-       rsa = EVP_PKEY_get1_RSA (pkey);
-       if (!rsa)
-               return 0;
-
-       ret = i2d_RSA_PUBKEY (rsa, &p);
-
-       RSA_free (rsa);
-       return ret;
-
-}
index a262d6a0906b84057a513ca9d4e03a9e76e46823..85ee5b2f58a63eae86490c0ff3cfa60f204289db 100644 (file)
@@ -25,9 +25,6 @@ mono_btls_key_get_bits (EVP_PKEY *pkey);
 int
 mono_btls_key_is_rsa (EVP_PKEY *pkey);
 
-int
-mono_btls_key_test (EVP_PKEY *pkey);
-
 int
 mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int include_private_bits);
 
index ddb88d6710a3332e0aba42da88b1ab5833e44cb6..f3e3f491464916e58e4719b0a172a249e7806410 100644 (file)
@@ -201,29 +201,3 @@ mono_btls_ssl_set_verify_param (MonoBtlsSsl *ptr, const MonoBtlsX509VerifyParam
 {
        return SSL_set1_param (ptr->ssl, mono_btls_x509_verify_param_peek_param (param));
 }
-
-void
-mono_btls_ssl_test (MonoBtlsSsl *ptr)
-{
-       SSL_SESSION *session;
-       const char *version;
-       const SSL_CIPHER *cipher;
-       int test;
-
-//     SSL_get_ciphers(<#const SSL *ssl#>)
-
-       test = SSL_version (ptr->ssl);
-       debug_printf(ptr, "TEST: %d\n", test);
-       session = SSL_get_session(ptr->ssl);
-       if (session) {
-               version = SSL_SESSION_get_version(session);
-               debug_printf (ptr, "SESSION: %p - %s\n", session, version);
-       }
-
-       cipher = SSL_get_current_cipher (ptr->ssl);
-       if (cipher) {
-               test = SSL_CIPHER_get_id (cipher);
-               version = SSL_CIPHER_get_name (cipher);
-               debug_printf (ptr, "CIPHER: %p - %x:%s\n", cipher, test, version);
-       }
-}
index 1557995b22dbc25e6c16311ad2b0bec3264e0e0e..7abaeea56f4a0db7e1b1065d11f75fa62bcd6992 100644 (file)
@@ -77,7 +77,4 @@ mono_btls_ssl_set_verify_param (MonoBtlsSsl *ptr, const MonoBtlsX509VerifyParam
 void
 mono_btls_ssl_destroy (MonoBtlsSsl *ptr);
 
-void
-mono_btls_ssl_test (MonoBtlsSsl *ptr);
-
 #endif /* defined(__btls__btls_ssl__) */
index 8ed77d01ba3592d0b7758ba6b7574efa146459ec..f023e31a8485464cbb7139fe3e4e5795a873126b 100644 (file)
@@ -124,18 +124,6 @@ mono_btls_x509_store_ctx_get_untrusted (MonoBtlsX509StoreCtx *ctx)
        return mono_btls_x509_chain_from_certs (untrusted);
 }
 
-void
-mono_btls_x509_store_ctx_test (MonoBtlsX509StoreCtx *ctx)
-{
-       X509_VERIFY_PARAM *param;
-       char *peer;
-
-       fprintf (stderr, "TEST: %p!\n", ctx);
-       param = X509_STORE_CTX_get0_param (ctx->ctx);
-       peer = X509_VERIFY_PARAM_get0_peername(param);
-       fprintf (stderr, "TEST #1: %s\n", peer);
-}
-
 int
 mono_btls_x509_store_ctx_init (MonoBtlsX509StoreCtx *ctx,
                                   MonoBtlsX509Store *store, MonoBtlsX509Chain *chain)
index c5ed499612a9bea60b1437c75119521daef20766..188092e0cd7971f5ba417eefb39bdd930bf59364 100644 (file)
@@ -43,9 +43,6 @@ mono_btls_x509_store_ctx_get_current_cert (MonoBtlsX509StoreCtx *ctx);
 X509 *
 mono_btls_x509_store_ctx_get_current_issuer (MonoBtlsX509StoreCtx *ctx);
 
-void
-mono_btls_x509_store_ctx_test (MonoBtlsX509StoreCtx *ctx);
-
 int
 mono_btls_x509_store_ctx_init (MonoBtlsX509StoreCtx *ctx,
                                   MonoBtlsX509Store *store, MonoBtlsX509Chain *chain);
index f86eac1c6b745d818f6f8fb12aeac888168e7ffd..c5a9528eb6c1b139c6cf74622ccbcbc8cc4fc8d7 100644 (file)
@@ -107,8 +107,7 @@ ICALL(BTLS_KEY_1, "mono_btls_key_free", mono_btls_key_free)
 ICALL(BTLS_KEY_2, "mono_btls_key_get_bits", mono_btls_key_get_bits)
 ICALL(BTLS_KEY_3, "mono_btls_key_get_bytes", mono_btls_key_get_bytes)
 ICALL(BTLS_KEY_4, "mono_btls_key_is_rsa", mono_btls_key_is_rsa)
-ICALL(BTLS_KEY_5, "mono_btls_key_test", mono_btls_key_test)
-ICALL(BTLS_KEY_6, "mono_btls_key_up_ref", mono_btls_key_up_ref)
+ICALL(BTLS_KEY_5, "mono_btls_key_up_ref", mono_btls_key_up_ref)
 
 ICALL_TYPE(BTLS_OBJECT, "Mono.Btls.MonoBtlsObject", BTLS_OBJECT_1)
 ICALL(BTLS_OBJECT_1, "mono_btls_free", mono_btls_free)
@@ -148,10 +147,9 @@ ICALL(BTLS_SSL_16, "mono_btls_ssl_set_cipher_list", mono_btls_ssl_set_cipher_lis
 ICALL(BTLS_SSL_17, "mono_btls_ssl_set_max_version", mono_btls_ssl_set_max_version)
 ICALL(BTLS_SSL_18, "mono_btls_ssl_set_min_version", mono_btls_ssl_set_min_version)
 ICALL(BTLS_SSL_19, "mono_btls_ssl_set_verify_param", mono_btls_ssl_set_verify_param)
-ICALL(BTLS_SSL_20, "mono_btls_ssl_test", mono_btls_ssl_test)
-ICALL(BTLS_SSL_21, "mono_btls_ssl_use_certificate", mono_btls_ssl_use_certificate)
-ICALL(BTLS_SSL_22, "mono_btls_ssl_use_private_key", mono_btls_ssl_use_private_key)
-ICALL(BTLS_SSL_23, "mono_btls_ssl_write", mono_btls_ssl_write)
+ICALL(BTLS_SSL_20, "mono_btls_ssl_use_certificate", mono_btls_ssl_use_certificate)
+ICALL(BTLS_SSL_21, "mono_btls_ssl_use_private_key", mono_btls_ssl_use_private_key)
+ICALL(BTLS_SSL_22, "mono_btls_ssl_write", mono_btls_ssl_write)
 
 ICALL_TYPE(BTLS_SSL_CTX, "Mono.Btls.MonoBtlsSslCtx", BTLS_SSL_CTX_1)
 ICALL(BTLS_SSL_CTX_1, "mono_btls_ssl_ctx_debug_printf", mono_btls_ssl_ctx_debug_printf)
@@ -291,7 +289,6 @@ ICALL(BTLS_X509_STORE_CTX_10, "mono_btls_x509_store_ctx_get_verify_param", mono_
 ICALL(BTLS_X509_STORE_CTX_11, "mono_btls_x509_store_ctx_init", mono_btls_x509_store_ctx_init)
 ICALL(BTLS_X509_STORE_CTX_12, "mono_btls_x509_store_ctx_new", mono_btls_x509_store_ctx_new)
 ICALL(BTLS_X509_STORE_CTX_13, "mono_btls_x509_store_ctx_set_param", mono_btls_x509_store_ctx_set_param)
-ICALL(BTLS_X509_STORE_CTX_14, "mono_btls_x509_store_ctx_test", mono_btls_x509_store_ctx_test)
 ICALL(BTLS_X509_STORE_CTX_15, "mono_btls_x509_store_ctx_up_ref", mono_btls_x509_store_ctx_up_ref)
 ICALL(BTLS_X509_STORE_CTX_16, "mono_btls_x509_store_ctx_verify_cert", mono_btls_x509_store_ctx_verify_cert)