001/* 002 * oauth2-oidc-sdk 003 * 004 * Copyright 2012-2016, Connect2id Ltd and contributors. 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use 007 * this file except in compliance with the License. You may obtain a copy of the 008 * License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software distributed 013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the 015 * specific language governing permissions and limitations under the License. 016 */ 017 018package com.nimbusds.oauth2.sdk.util.tls; 019 020 021/** 022 * TLS version. 023 * 024 * <p>See https://docs.oracle.com/javase/10/docs/specs/security/standard-names.html#sslcontext-algorithms 025 */ 026public enum TLSVersion { 027 028 029 /** 030 * Unspecified TLS. 031 */ 032 TLS("TLS"), 033 034 035 /** 036 * The TLS Protocol Version 1.0 (RFC 2246). 037 */ 038 TLS_1("TLSv1"), 039 040 041 /** 042 * The Transport Layer Security (TLS) Protocol Version 1.1 (RFC 4346). 043 */ 044 TLS_1_1("TLSv1.1"), 045 046 047 /** 048 * The Transport Layer Security (TLS) Protocol Version 1.2 (RFC 5246). 049 */ 050 TLS_1_2("TLSv1.2"), 051 052 053 /** 054 * Recommended: The Transport Layer Security (TLS) Protocol Version 1.3 055 * (RFC 8446). 056 */ 057 TLS_1_3("TLSv1.3"); 058 059 060 /** 061 * The algorithm value. 062 */ 063 private final String value; 064 065 066 TLSVersion(final String value) { 067 this.value = value; 068 } 069 070 071 @Override 072 public String toString() { 073 return value; 074 } 075}