/*
 * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package sun.security.ssl;

/*
 * Scopes defining different parts of TLS protocol.
 */

public enum SSLScope {
    // Handshake signature scope as in signature_algorithms extension.
    HANDSHAKE_SIGNATURE("HandshakeSignature"),

    // Certificate signature scope as in signature_algorithms_cert extension.
    CERTIFICATE_SIGNATURE("CertificateSignature");

    private final String name;

    SSLScope(String name) {
        this.name = name;
    }

    // Note: the SSLScope name is case-insensitive.
    public static SSLScope nameOf(String scopeName) {
        for (SSLScope scope : SSLScope.values()) {
            if (scope.name.equalsIgnoreCase(scopeName)) {
                return scope;
            }
        }

        return null;
    }
}
