summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-08-28 09:44:23 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-08-28 09:44:23 +0700
commit9580c3fc391bbf870b639612f114f2325683a68c (patch)
tree75bf23d66ccf54dc27318a55fc79c06b36b68756 /crypto/src
parentRefactor redundant blocks (diff)
downloadBouncyCastle.NET-ed25519-9580c3fc391bbf870b639612f114f2325683a68c.tar.xz
Formatting
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/tls/TlsUtilities.cs14
1 files changed, 2 insertions, 12 deletions
diff --git a/crypto/src/crypto/tls/TlsUtilities.cs b/crypto/src/crypto/tls/TlsUtilities.cs
index 29310100a..d571e5900 100644
--- a/crypto/src/crypto/tls/TlsUtilities.cs
+++ b/crypto/src/crypto/tls/TlsUtilities.cs
@@ -740,9 +740,7 @@ namespace Org.BouncyCastle.Crypto.Tls
             int prfAlgorithm = context.SecurityParameters.PrfAlgorithm;
 
             if (prfAlgorithm == PrfAlgorithm.tls_prf_legacy)
-            {
                 return PRF_legacy(secret, label, labelSeed, size);
-            }
 
             IDigest prfDigest = CreatePrfHash(prfAlgorithm);
             byte[] buf = new byte[size];
@@ -817,9 +815,7 @@ namespace Org.BouncyCastle.Crypto.Tls
                     DerBitString ku = KeyUsage.GetInstance(ext);
                     int bits = ku.GetBytes()[0];
                     if ((bits & keyUsageBits) != keyUsageBits)
-                    {
                         throw new TlsFatalAlert(AlertDescription.certificate_unknown);
-                    }
                 }
             }
         }
@@ -831,9 +827,7 @@ namespace Org.BouncyCastle.Crypto.Tls
             byte[] seed = Concat(securityParameters.ServerRandom, securityParameters.ClientRandom);
 
             if (IsSsl(context))
-            {
                 return CalculateKeyBlock_Ssl(master_secret, seed, size);
-            }
 
             return PRF(context, master_secret, ExporterLabel.key_expansion, seed, size);
         }
@@ -876,13 +870,11 @@ namespace Org.BouncyCastle.Crypto.Tls
                 :   Concat(securityParameters.ClientRandom, securityParameters.ServerRandom);
 
             if (IsSsl(context))
-            {
                 return CalculateMasterSecret_Ssl(pre_master_secret, seed);
-            }
 
             string asciiLabel = securityParameters.extendedMasterSecret
-                ? ExporterLabel.extended_master_secret
-                : ExporterLabel.master_secret;
+                ?   ExporterLabel.extended_master_secret
+                :   ExporterLabel.master_secret;
 
             return PRF(context, pre_master_secret, asciiLabel, seed, 48);
         }
@@ -919,9 +911,7 @@ namespace Org.BouncyCastle.Crypto.Tls
         internal static byte[] CalculateVerifyData(TlsContext context, string asciiLabel, byte[] handshakeHash)
         {
             if (IsSsl(context))
-            {
                 return handshakeHash;
-            }
 
             SecurityParameters securityParameters = context.SecurityParameters;
             byte[] master_secret = securityParameters.MasterSecret;