src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMKeyValue.java [436:459]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        private static String getCurveOid(ECParameterSpec params) {
            // Check that the params represent one of the supported
            // curves. If there is a match, return the object identifier
            // of the curve.
            Curve match;
            if (matchCurve(params, SECP256R1)) {
                match = SECP256R1;
            } else if (matchCurve(params, SECP384R1)) {
                match = SECP384R1;
            } else if (matchCurve(params, SECP521R1)) {
                match = SECP521R1;
            } else {
                return null;
            }
            return match.getObjectId();
        }

        private static boolean matchCurve(ECParameterSpec params, Curve curve) {
            int fieldSize = params.getCurve().getField().getFieldSize();
            return curve.getCurve().getField().getFieldSize() == fieldSize
                && curve.getCurve().equals(params.getCurve())
                && curve.getGenerator().equals(params.getGenerator())
                && curve.getOrder().equals(params.getOrder())
                && curve.getCofactor() == params.getCofactor();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/xml/security/keys/content/keyvalues/ECKeyValue.java [252:275]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private static String getCurveOid(ECParameterSpec params) {
        // Check that the params represent one of the supported
        // curves. If there is a match, return the object identifier
        // of the curve.
        Curve match;
        if (matchCurve(params, SECP256R1)) {
            match = SECP256R1;
        } else if (matchCurve(params, SECP384R1)) {
            match = SECP384R1;
        } else if (matchCurve(params, SECP521R1)) {
            match = SECP521R1;
        } else {
            return null;
        }
        return match.getObjectId();
    }

    private static boolean matchCurve(ECParameterSpec params, Curve curve) {
        int fieldSize = params.getCurve().getField().getFieldSize();
        return curve.getCurve().getField().getFieldSize() == fieldSize
            && curve.getCurve().equals(params.getCurve())
            && curve.getGenerator().equals(params.getGenerator())
            && curve.getOrder().equals(params.getOrder())
            && curve.getCofactor() == params.getCofactor();
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



