Skip to content

Commit 68360f7

Browse files
committed
Fix minor grammar problems.
1 parent e09c61f commit 68360f7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

docs/content/connection-options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ These are the options that need to be used in order to configure a connection to
108108
<tr>
109109
<td>Certificate Store Location, CertificateStoreLocation</td>
110110
<td>None</td>
111-
<td>Specifies whether the connection should be encrypted with a certificate from the Certificate Store on the machine, you can specify either <code>CurrentUser</code> or <code>LocalMachine</code> as valid locations, defaults to None which results in the certificate store not being used.</td>
111+
<td>Specifies whether the connection should be encrypted with a certificate from the Certificate Store on the machine. The default value of <code>None</code> means the certificate store is not used; a value of <code>CurrentUser</code> or <code>LocalMachine</code> uses the specified store.</td>
112112
</tr>
113113
<tr>
114114
<td>Certificate Thumbprint, CertificateThumbprint</td>
115115
<td></td>
116-
<td>Specifies which specific certificate should be used from the Certificate Store specified in the setting above. If none is specified and Certificate Store is chosen, all certificates from the store will be used to attempt to make the connection.</td>
116+
<td>Specifies which certificate should be used from the Certificate Store specified in the setting above. This option must be used to indicate which certificate in the store should be used for authentication.</td>
117117
</tr>
118118
</table>
119119

src/MySqlConnector/Core/ServerSession.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -890,20 +890,20 @@ private async Task InitSslAsync(ProtocolCapabilities serverCapabilities, Connect
890890
if (store.Certificates.Count == 0)
891891
{
892892
Log.Error("Session{0} no certificates were found in the certificate store", m_logArguments);
893-
throw new MySqlException("No certificates were found in the certifcate store");
893+
throw new MySqlException("No certificates were found in the certificate store");
894894
}
895895

896896
clientCertificates = new X509CertificateCollection(store.Certificates);
897897
}
898898
else
899899
{
900-
var requireValid = (cs.SslMode == MySqlSslMode.VerifyCA || cs.SslMode == MySqlSslMode.VerifyFull) ? true : false;
900+
var requireValid = cs.SslMode == MySqlSslMode.VerifyCA || cs.SslMode == MySqlSslMode.VerifyFull;
901901
var foundCertificates = store.Certificates.Find(X509FindType.FindByThumbprint, cs.CertificateThumbprint, requireValid);
902902
if (foundCertificates.Count == 0)
903903
{
904904
m_logArguments[1] = cs.CertificateThumbprint;
905-
Log.Error("Session{0} certificate with specified thumbprint not found in store '{1}'", m_logArguments);
906-
throw new MySqlException("Certificate with Thumbprint " + cs.CertificateThumbprint + " not found");
905+
Log.Error("Session{0} certificate with Thumbprint={1} not found in store", m_logArguments);
906+
throw new MySqlException("Certificate with Thumbprint {0} not found".FormatInvariant(cs.CertificateThumbprint));
907907
}
908908

909909
clientCertificates = new X509CertificateCollection(foundCertificates);
@@ -912,7 +912,7 @@ private async Task InitSslAsync(ProtocolCapabilities serverCapabilities, Connect
912912
catch (CryptographicException ex)
913913
{
914914
m_logArguments[1] = cs.CertificateStoreLocation;
915-
Log.Error(ex, "Session{0} couldn't load certificate from CertificateStoreLocation '{1}'", m_logArguments);
915+
Log.Error(ex, "Session{0} couldn't load certificate from CertificateStoreLocation={1}", m_logArguments);
916916
throw new MySqlException("Certificate couldn't be loaded from the CertificateStoreLocation", ex);
917917
}
918918
}

0 commit comments

Comments
 (0)