@@ -18,37 +18,20 @@ namespace Dropbox.Api
1818 /// </summary>
1919 /// <remarks>
2020 /// <para>
21- /// Dropbox recommends that all clients implement certificate pinning, unfortunately it isn't currently
22- /// possible to implement this in a portable assembly, so this class is provided to help implement this.</para>
21+ /// Dropbox recommends that all clients implement certificate pinning and this class provides implementation for desktop
22+ /// and server application as <see cref="DropboxCertHelper.InitializeCertPinning"/>. Unfortunately it isn't currently
23+ /// possible to implement this in a portable assembly, so this class also provides methods to help implement this.</para>
2324 /// <para>
2425 /// For more information about certificate pinning see
2526 /// <a href="https://www.owasp.org/index.php/Certificate_and_Public_Key_Pinning">Certificate and Public Key Pinning</a>.
2627 /// </para>
2728 /// <para>
2829 /// These helper methods allow client code to check if the certificate used by a Dropbox server
2930 /// was issued with a certificate chain that originates with a root certificate that Dropbox
30- /// either currently uses, or may use in the future.
31+ /// either currently uses, or may use in the future. These methods would be called before calling
32+ /// the <see cref="DropboxClient"/> constructor.
3133 /// </para>
3234 /// </remarks>
33- /// <example>
34- /// <para>The following code demonstrates how to implement certificate pinning on a desktop or
35- /// server application.</para>
36- /// <code>
37- /// private void InitializeCertPinning()
38- /// {
39- /// ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) =>
40- /// {
41- /// var root = chain.ChainElements[chain.ChainElements.Count - 1];
42- /// var publicKey = root.Certificate.GetPublicKeyString();
43- ///
44- /// return DropboxCertHelper.IsKnownRootCertPublicKey(publicKey);
45- /// };
46- /// }
47- /// </code>
48- /// <para>This code would be called before calling the <see cref="DropboxClient"/> constructor.</para>
49- /// <para><strong>Note:</strong> If your application is communicating with other web services you may need
50- /// to perform different pinning checks for different services.</para>
51- /// </example>
5235 public static class DropboxCertHelper
5336 {
5437 /// <summary>
0 commit comments