All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.venafi.vcert.sdk.policy.api.domain.CloudPolicy Maven / Gradle / Ivy

Go to download

VCert is a Java library, SDK, designed to simplify key generation and enrollment of machine identities (also known as SSL/TLS certificates and keys) that comply with enterprise security policy by using the Venafi Platform or Venafi Cloud.

There is a newer version: 0.9.3
Show newest version
package com.venafi.vcert.sdk.policy.api.domain;

import com.venafi.vcert.sdk.connectors.cloud.domain.CertificateIssuingTemplate;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class CloudPolicy {
    private CertificateIssuingTemplate certificateIssuingTemplate;
    private CAInfo caInfo;

    @Data
    @AllArgsConstructor
    public static class CAInfo {

        private String certificateAuthorityString;
        private String caType;
        private String caAccountKey;
        private String vendorProductName;

        public CAInfo(String certificateAuthority) {

            this.certificateAuthorityString = certificateAuthority;

            String[] caInfoArray = StringUtils.split(certificateAuthorityString, "\\");

            this.caType = caInfoArray[0];
            this.caAccountKey = caInfoArray[1];
            this.vendorProductName = caInfoArray[2];
        }

        public CAInfo(String caType, String caAccountKey, String vendorProductName) {
            this.caType = caType;
            this.caAccountKey = caAccountKey;
            this.vendorProductName = vendorProductName;

            certificateAuthorityString = caType+"\\"+caAccountKey+"\\"+vendorProductName;
        }
    }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy