HasAnySupportedNamedCurves() public static method

public static HasAnySupportedNamedCurves ( ) : bool
return bool
Beispiel #1
0
        protected virtual bool SupportsClientEccCapabilities(int[] namedCurves, byte[] ecPointFormats)
        {
            // NOTE: BC supports all the current set of point formats so we don't check them here

            if (namedCurves == null)
            {
                /*
                 * RFC 4492 4. A client that proposes ECC cipher suites may choose not to include these
                 * extensions. In this case, the server is free to choose any one of the elliptic curves
                 * or point formats [...].
                 */
                return(TlsEccUtilities.HasAnySupportedNamedCurves());
            }

            for (int i = 0; i < namedCurves.Length; ++i)
            {
                int namedCurve = namedCurves[i];
                if (NamedCurve.IsValid(namedCurve) &&
                    (!NamedCurve.RefersToASpecificNamedCurve(namedCurve) || TlsEccUtilities.IsSupportedNamedCurve(namedCurve)))
                {
                    return(true);
                }
            }

            return(false);
        }
 protected virtual bool SupportsClientEccCapabilities(int[] namedCurves, byte[] ecPointFormats)
 {
     if (namedCurves == null)
     {
         return(TlsEccUtilities.HasAnySupportedNamedCurves());
     }
     foreach (int namedCurve in namedCurves)
     {
         if (NamedCurve.IsValid(namedCurve) && (!NamedCurve.RefersToASpecificNamedCurve(namedCurve) || TlsEccUtilities.IsSupportedNamedCurve(namedCurve)))
         {
             return(true);
         }
     }
     return(false);
 }