blackbeam / rust-mysql-simple

Mysql client library implemented in rust.
Apache License 2.0
666 stars 145 forks source link

Pkcs1 debug messages output on screen #389

Closed havok4u closed 3 months ago

havok4u commented 3 months ago

In mysql-25.0.1 code was added to the rustls_opts.rc file (line 91) that returns a debug message vs the priv key.

 90         if let Some(priv_key) = priv_key {
 91             return Ok((cert_chain, dbg!(priv_key)));
 92         }   

So now when running I get the following message repeated multiple times

[/home/someuser/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mysql-25.0.1/src/conn/opts/rustls_opts.rs:91:36] priv_key = Pkcs1(
    PrivatePkcs1KeyDer(
        "[secret key elided]",
    ),
)

I fixed it by removing the debug and just returning the priv_key or I guess I could remove the entire if statement as the default returns the cert_chain, priv_key.

Is there a reason this was done?

blackbeam commented 3 months ago

Oh. I just forgot to remove it, sorry.