1
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class AccessDescriptions
|
||||
{
|
||||
private AccessLocation accessLocation;
|
||||
|
||||
private AccessMethod accessMethod;
|
||||
|
||||
public void setAccessLocation(AccessLocation accessLocation){
|
||||
this.accessLocation = accessLocation;
|
||||
}
|
||||
public AccessLocation getAccessLocation(){
|
||||
return this.accessLocation;
|
||||
}
|
||||
public void setAccessMethod(AccessMethod accessMethod){
|
||||
this.accessMethod = accessMethod;
|
||||
}
|
||||
public AccessMethod getAccessMethod(){
|
||||
return this.accessMethod;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class AccessLocation
|
||||
{
|
||||
private Name name;
|
||||
|
||||
private int type;
|
||||
|
||||
public void setName(Name name){
|
||||
this.name = name;
|
||||
}
|
||||
public Name getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setType(int type){
|
||||
this.type = type;
|
||||
}
|
||||
public int getType(){
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class AccessMethod
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AlgorithmId {
|
||||
private String name;
|
||||
|
||||
private OID oID;
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setOID(OID oID) {
|
||||
this.oID = oID;
|
||||
}
|
||||
|
||||
public OID getOID() {
|
||||
return this.oID;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class AuthKeyId
|
||||
{
|
||||
private String identifier;
|
||||
|
||||
public void setIdentifier(String identifier){
|
||||
this.identifier = identifier;
|
||||
}
|
||||
public String getIdentifier(){
|
||||
return this.identifier;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class AuthorityInfoAccessExtension
|
||||
{
|
||||
private List<AccessDescriptions> accessDescriptions;
|
||||
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setAccessDescriptions(List<AccessDescriptions> accessDescriptions){
|
||||
this.accessDescriptions = accessDescriptions;
|
||||
}
|
||||
public List<AccessDescriptions> getAccessDescriptions(){
|
||||
return this.accessDescriptions;
|
||||
}
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class AuthorityKeyIdentifierExtension
|
||||
{
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class BasicConstraintsExtension
|
||||
{
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class CRLDistributionPointsExtension
|
||||
{
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class CertificatePoliciesExtension
|
||||
{
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class ExtendedKeyUsageExtension
|
||||
{
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private List<String> extendedKeyUsage;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtendedKeyUsage(List<String> extendedKeyUsage){
|
||||
this.extendedKeyUsage = extendedKeyUsage;
|
||||
}
|
||||
public List<String> getExtendedKeyUsage(){
|
||||
return this.extendedKeyUsage;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class ExtensionId
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
public class HostObject
|
||||
{
|
||||
private String name;
|
||||
|
||||
private int type;
|
||||
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setType(int type){
|
||||
this.type = type;
|
||||
}
|
||||
public int getType(){
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class IssuerDN
|
||||
{
|
||||
private String commonName;
|
||||
|
||||
private String country;
|
||||
|
||||
private boolean empty;
|
||||
|
||||
private String encoded;
|
||||
|
||||
private String encodedInternal;
|
||||
|
||||
private String name;
|
||||
|
||||
private String organization;
|
||||
|
||||
private String organizationalUnit;
|
||||
|
||||
private String rFC1779Name;
|
||||
|
||||
private String rFC2253CanonicalName;
|
||||
|
||||
private String rFC2253Name;
|
||||
|
||||
private int type;
|
||||
|
||||
public void setCommonName(String commonName){
|
||||
this.commonName = commonName;
|
||||
}
|
||||
public String getCommonName(){
|
||||
return this.commonName;
|
||||
}
|
||||
public void setCountry(String country){
|
||||
this.country = country;
|
||||
}
|
||||
public String getCountry(){
|
||||
return this.country;
|
||||
}
|
||||
public void setEmpty(boolean empty){
|
||||
this.empty = empty;
|
||||
}
|
||||
public boolean getEmpty(){
|
||||
return this.empty;
|
||||
}
|
||||
public void setEncoded(String encoded){
|
||||
this.encoded = encoded;
|
||||
}
|
||||
public String getEncoded(){
|
||||
return this.encoded;
|
||||
}
|
||||
public void setEncodedInternal(String encodedInternal){
|
||||
this.encodedInternal = encodedInternal;
|
||||
}
|
||||
public String getEncodedInternal(){
|
||||
return this.encodedInternal;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setOrganization(String organization){
|
||||
this.organization = organization;
|
||||
}
|
||||
public String getOrganization(){
|
||||
return this.organization;
|
||||
}
|
||||
public void setOrganizationalUnit(String organizationalUnit){
|
||||
this.organizationalUnit = organizationalUnit;
|
||||
}
|
||||
public String getOrganizationalUnit(){
|
||||
return this.organizationalUnit;
|
||||
}
|
||||
public void setRFC1779Name(String rFC1779Name){
|
||||
this.rFC1779Name = rFC1779Name;
|
||||
}
|
||||
public String getRFC1779Name(){
|
||||
return this.rFC1779Name;
|
||||
}
|
||||
public void setRFC2253CanonicalName(String rFC2253CanonicalName){
|
||||
this.rFC2253CanonicalName = rFC2253CanonicalName;
|
||||
}
|
||||
public String getRFC2253CanonicalName(){
|
||||
return this.rFC2253CanonicalName;
|
||||
}
|
||||
public void setRFC2253Name(String rFC2253Name){
|
||||
this.rFC2253Name = rFC2253Name;
|
||||
}
|
||||
public String getRFC2253Name(){
|
||||
return this.rFC2253Name;
|
||||
}
|
||||
public void setType(int type){
|
||||
this.type = type;
|
||||
}
|
||||
public int getType(){
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class Name
|
||||
{
|
||||
private String host;
|
||||
|
||||
private HostObject hostObject;
|
||||
|
||||
private String name;
|
||||
|
||||
private String scheme;
|
||||
|
||||
private int type;
|
||||
|
||||
private String uRI;
|
||||
|
||||
public void setHost(String host){
|
||||
this.host = host;
|
||||
}
|
||||
public String getHost(){
|
||||
return this.host;
|
||||
}
|
||||
public void setHostObject(HostObject hostObject){
|
||||
this.hostObject = hostObject;
|
||||
}
|
||||
public HostObject getHostObject(){
|
||||
return this.hostObject;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setScheme(String scheme){
|
||||
this.scheme = scheme;
|
||||
}
|
||||
public String getScheme(){
|
||||
return this.scheme;
|
||||
}
|
||||
public void setType(int type){
|
||||
this.type = type;
|
||||
}
|
||||
public int getType(){
|
||||
return this.type;
|
||||
}
|
||||
public void setURI(String uRI){
|
||||
this.uRI = uRI;
|
||||
}
|
||||
public String getURI(){
|
||||
return this.uRI;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class OID
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PublicKey {
|
||||
private String algorithm;
|
||||
|
||||
private AlgorithmId algorithmId;
|
||||
|
||||
private String encoded;
|
||||
|
||||
private String encodedInternal;
|
||||
|
||||
private String format;
|
||||
|
||||
private String modulus;
|
||||
|
||||
private int publicExponent;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class Root {
|
||||
private AuthKeyId authKeyId;
|
||||
|
||||
private AuthorityInfoAccessExtension authorityInfoAccessExtension;
|
||||
|
||||
private AuthorityKeyIdentifierExtension authorityKeyIdentifierExtension;
|
||||
|
||||
private int basicConstraints;
|
||||
|
||||
private BasicConstraintsExtension basicConstraintsExtension;
|
||||
|
||||
private CRLDistributionPointsExtension cRLDistributionPointsExtension;
|
||||
|
||||
private CertificatePoliciesExtension certificatePoliciesExtension;
|
||||
|
||||
private List<String> criticalExtensionOIDs;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private String encoded;
|
||||
|
||||
private String encodedInternal;
|
||||
|
||||
private List<String> extendedKeyUsage;
|
||||
|
||||
private ExtendedKeyUsageExtension extendedKeyUsageExtension;
|
||||
|
||||
private IssuerDN issuerDN;
|
||||
|
||||
private List<Boolean> keyUsage;
|
||||
|
||||
private String name;
|
||||
|
||||
private List<String> nonCriticalExtensionOIDs;
|
||||
|
||||
private Date notAfter;
|
||||
|
||||
private Date notBefore;
|
||||
|
||||
private PublicKey publicKey;
|
||||
|
||||
private double serialNumber;
|
||||
|
||||
private SerialNumberObject serialNumberObject;
|
||||
|
||||
private String sigAlgName;
|
||||
|
||||
private String sigAlgOID;
|
||||
|
||||
private String signature;
|
||||
|
||||
private SubjectAlternativeNameExtension subjectAlternativeNameExtension;
|
||||
|
||||
private List<List<String>> subjectAlternativeNames;
|
||||
|
||||
private SubjectDN subjectDN;
|
||||
|
||||
private SubjectKeyId subjectKeyId;
|
||||
|
||||
private SubjectKeyIdentifierExtension subjectKeyIdentifierExtension;
|
||||
|
||||
private String tBSCertificate;
|
||||
|
||||
private String type;
|
||||
|
||||
private int version;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author czh
|
||||
* @data 2020/10/10 9:26
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@Table(name = "tb_ssl_basic_info")
|
||||
public class SSLBasicInfo {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Integer id;
|
||||
private String domain;
|
||||
|
||||
//序列号
|
||||
private String serialNum;
|
||||
//版本
|
||||
private String version;
|
||||
//加密算法
|
||||
private String encryptionAlgorithm;
|
||||
//签名算法
|
||||
private String signatureAlgorithm;
|
||||
|
||||
//证书类型
|
||||
private String certificateType;
|
||||
//证书品牌
|
||||
private String certificateBrand;
|
||||
//sha256指纹
|
||||
private String sha256Fingerprint;
|
||||
//签发时间
|
||||
private Date issueDate;
|
||||
//到期时间
|
||||
private Date deadlineDate;
|
||||
|
||||
|
||||
|
||||
private String themeAll;
|
||||
|
||||
private String themeCn;
|
||||
private String themeO;
|
||||
private String themeOu;
|
||||
private String themeL;
|
||||
private String themeSt;
|
||||
private String themeC;
|
||||
|
||||
|
||||
private String issueAll;
|
||||
|
||||
private String issueCn;
|
||||
private String issueO;
|
||||
private String issueC;
|
||||
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author czh
|
||||
* @data 2020/8/11 11:44
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SSLDetailsInfo {
|
||||
|
||||
//序列号
|
||||
private String serialNum;
|
||||
//版本
|
||||
private String version;
|
||||
//加密算法
|
||||
private String encryptionAlgorithm;
|
||||
//签名算法
|
||||
private String signatureAlgorithm;
|
||||
|
||||
//证书类型
|
||||
private String certificateType;
|
||||
//证书品牌
|
||||
private String certificateBrand;
|
||||
//sha256指纹
|
||||
private String sha256Fingerprint;
|
||||
//签发时间
|
||||
private Date issueDate;
|
||||
//到期时间
|
||||
private Date deadlineDate;
|
||||
//有效期
|
||||
private String validPeriod;
|
||||
//sans
|
||||
private List<String> sansList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author czh
|
||||
* @data 2020/8/11 11:44
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SSLInfo {
|
||||
private SSLSubjectInfo sslSubjectInfo;
|
||||
private SSLIssuerInfo sslIssuerInfo;
|
||||
private SSLDetailsInfo sslDetailsInfo;
|
||||
private String subDN;
|
||||
private String issDN;
|
||||
private String webUrl;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author czh
|
||||
* @data 2020/8/11 11:44
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SSLIssuerInfo {
|
||||
private String cn;
|
||||
private String o;
|
||||
private String c;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author czh
|
||||
* @data 2020/8/11 11:44
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SSLSubjectInfo {
|
||||
private String cn;
|
||||
private String o;
|
||||
private String ou;
|
||||
private String l;
|
||||
private String st;
|
||||
private String c;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class SerialNumberObject
|
||||
{
|
||||
private double number;
|
||||
|
||||
public void setNumber(double number){
|
||||
this.number = number;
|
||||
}
|
||||
public double getNumber(){
|
||||
return this.number;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class SubjectAlternativeNameExtension
|
||||
{
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class SubjectDN
|
||||
{
|
||||
private String commonName;
|
||||
|
||||
private String country;
|
||||
|
||||
private boolean empty;
|
||||
|
||||
private String encoded;
|
||||
|
||||
private String encodedInternal;
|
||||
|
||||
private String name;
|
||||
|
||||
private String organization;
|
||||
|
||||
private String rFC1779Name;
|
||||
|
||||
private String rFC2253CanonicalName;
|
||||
|
||||
private String rFC2253Name;
|
||||
|
||||
private String state;
|
||||
|
||||
private int type;
|
||||
|
||||
public void setCommonName(String commonName){
|
||||
this.commonName = commonName;
|
||||
}
|
||||
public String getCommonName(){
|
||||
return this.commonName;
|
||||
}
|
||||
public void setCountry(String country){
|
||||
this.country = country;
|
||||
}
|
||||
public String getCountry(){
|
||||
return this.country;
|
||||
}
|
||||
public void setEmpty(boolean empty){
|
||||
this.empty = empty;
|
||||
}
|
||||
public boolean getEmpty(){
|
||||
return this.empty;
|
||||
}
|
||||
public void setEncoded(String encoded){
|
||||
this.encoded = encoded;
|
||||
}
|
||||
public String getEncoded(){
|
||||
return this.encoded;
|
||||
}
|
||||
public void setEncodedInternal(String encodedInternal){
|
||||
this.encodedInternal = encodedInternal;
|
||||
}
|
||||
public String getEncodedInternal(){
|
||||
return this.encodedInternal;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setOrganization(String organization){
|
||||
this.organization = organization;
|
||||
}
|
||||
public String getOrganization(){
|
||||
return this.organization;
|
||||
}
|
||||
public void setRFC1779Name(String rFC1779Name){
|
||||
this.rFC1779Name = rFC1779Name;
|
||||
}
|
||||
public String getRFC1779Name(){
|
||||
return this.rFC1779Name;
|
||||
}
|
||||
public void setRFC2253CanonicalName(String rFC2253CanonicalName){
|
||||
this.rFC2253CanonicalName = rFC2253CanonicalName;
|
||||
}
|
||||
public String getRFC2253CanonicalName(){
|
||||
return this.rFC2253CanonicalName;
|
||||
}
|
||||
public void setRFC2253Name(String rFC2253Name){
|
||||
this.rFC2253Name = rFC2253Name;
|
||||
}
|
||||
public String getRFC2253Name(){
|
||||
return this.rFC2253Name;
|
||||
}
|
||||
public void setState(String state){
|
||||
this.state = state;
|
||||
}
|
||||
public String getState(){
|
||||
return this.state;
|
||||
}
|
||||
public void setType(int type){
|
||||
this.type = type;
|
||||
}
|
||||
public int getType(){
|
||||
return this.type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
public class SubjectKeyId
|
||||
{
|
||||
private String identifier;
|
||||
|
||||
public void setIdentifier(String identifier){
|
||||
this.identifier = identifier;
|
||||
}
|
||||
public String getIdentifier(){
|
||||
return this.identifier;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
import java.util.List;
|
||||
|
||||
public class SubjectKeyIdentifierExtension
|
||||
{
|
||||
private boolean critical;
|
||||
|
||||
private List<String> elements;
|
||||
|
||||
private ExtensionId extensionId;
|
||||
|
||||
private String extensionValue;
|
||||
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
private String value;
|
||||
|
||||
public void setCritical(boolean critical){
|
||||
this.critical = critical;
|
||||
}
|
||||
public boolean getCritical(){
|
||||
return this.critical;
|
||||
}
|
||||
public void setElements(List<String> elements){
|
||||
this.elements = elements;
|
||||
}
|
||||
public List<String> getElements(){
|
||||
return this.elements;
|
||||
}
|
||||
public void setExtensionId(ExtensionId extensionId){
|
||||
this.extensionId = extensionId;
|
||||
}
|
||||
public ExtensionId getExtensionId(){
|
||||
return this.extensionId;
|
||||
}
|
||||
public void setExtensionValue(String extensionValue){
|
||||
this.extensionValue = extensionValue;
|
||||
}
|
||||
public String getExtensionValue(){
|
||||
return this.extensionValue;
|
||||
}
|
||||
public void setId(String id){
|
||||
this.id = id;
|
||||
}
|
||||
public String getId(){
|
||||
return this.id;
|
||||
}
|
||||
public void setName(String name){
|
||||
this.name = name;
|
||||
}
|
||||
public String getName(){
|
||||
return this.name;
|
||||
}
|
||||
public void setValue(String value){
|
||||
this.value = value;
|
||||
}
|
||||
public String getValue(){
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.cym.utils.cert.ssl;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author ZhangSan_Plus
|
||||
* @version 1.0
|
||||
* @className XccSSLInfo
|
||||
* @description
|
||||
* @date 2022/8/27 16:17
|
||||
**/
|
||||
@Data
|
||||
public class XccSSLInfo {
|
||||
private String success;
|
||||
private String detectUrl;
|
||||
/**
|
||||
* 信任状态
|
||||
*/
|
||||
private String trustStatus;
|
||||
/**
|
||||
* 通用名称
|
||||
*/
|
||||
private String commonName;
|
||||
/**
|
||||
* 颁发者
|
||||
*/
|
||||
private String issuer;
|
||||
/**
|
||||
* 加密算法
|
||||
*/
|
||||
private String encryptionAlgorithm;
|
||||
/**
|
||||
* 签名算法
|
||||
*/
|
||||
private String signatureAlgorithm;
|
||||
/**
|
||||
* 证书透明(CT)
|
||||
*/
|
||||
private String certificateTransparency;
|
||||
/**
|
||||
* 吊销状态
|
||||
*/
|
||||
private String revocationStatus;
|
||||
|
||||
|
||||
//主题信息
|
||||
private String subjectCN;
|
||||
private String subjectO;
|
||||
private String subjectOU;
|
||||
private String subjectL;
|
||||
private String subjectST;
|
||||
private String subjectC;
|
||||
//签发者信息
|
||||
private String issueCN;
|
||||
private String issueO;
|
||||
private String issueC;
|
||||
private String issueOU;
|
||||
//证书信息
|
||||
private String serialNumber;
|
||||
private String rootCert;
|
||||
private String algorithm;
|
||||
private String certificateType;
|
||||
private String certificateBrand;
|
||||
private String privateKeyLen;
|
||||
private String SHA1Fingerprint;
|
||||
private String SHA256Fingerprint;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private String validityPeriod;
|
||||
private String extKeyUsage;
|
||||
private List<List<String>> sans;
|
||||
private String ocspUrl;
|
||||
private String crlUrl;
|
||||
private String caUrl;
|
||||
private String publicKey;
|
||||
private String openSSL;
|
||||
}
|
||||
Reference in New Issue
Block a user