model

package
v0.1.39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertDistinguishedName

type CertDistinguishedName struct {

	// 证书通用名称(CN)。
	CommonName string `json:"common_name"`

	// 国家编码,需符合正则\"**[A-Za-z]{2}**\"。若不传入,则默认继承父CA对应的值。
	Country *string `json:"country,omitempty"`

	// 省市名称。若不传入,则默认继承父CA对应的值。
	State *string `json:"state,omitempty"`

	// 地区名称。若不传入,则默认继承父CA对应的值。
	Locality *string `json:"locality,omitempty"`

	// 组织名称。若不传入,则默认继承父CA对应的值。
	Organization *string `json:"organization,omitempty"`

	// 组织单元名称。若不传入,则默认继承父CA对应的值。
	OrganizationalUnit *string `json:"organizational_unit,omitempty"`
}

func (CertDistinguishedName) String

func (o CertDistinguishedName) String() string

type CertificateAuthorities

type CertificateAuthorities struct {

	// CA证书ID。
	CaId string `json:"ca_id"`

	// CA类型:   - **ROOT**: 根CA   - **SUBORDINATE**: 从属CA
	Type string `json:"type"`

	// CA证书状态:   - **PENDING** : 待激活,此状态下,不可用于签发证书;   - **ACTIVED** : 已激活,此状态下,可用于签发证书;   - **DISABLED** : 已禁用,此状态下,不可用于签发证书;   - **DELETED** : 计划删除,此状态下,不可用于签发证书;   - **EXPIRED** : 已过期,此状态下,不可用于签发证书。
	Status string `json:"status"`

	// CA路径长度。 > 注:生成的根CA证书,其路径长度不做限制,但本字段在数据库中统一置为7。从属CA的路径长度在创建时由用户指定,缺省值为0。
	PathLength int32 `json:"path_length"`

	// 父CA证书ID,即签发此证书的CA证书ID。根CA中,此参数为**null**。
	IssuerId string `json:"issuer_id"`

	// 父CA证书名称。根CA中,此参数为**null**。
	IssuerName string `json:"issuer_name"`

	// 密钥算法。
	KeyAlgorithm string `json:"key_algorithm"`

	// 签名哈希算法。
	SignatureAlgorithm string `json:"signature_algorithm"`

	// 冻结标识:   - **0** : 非冻结状态;   - **其它值** : 冻结状态,当前预留。
	FreezeFlag int32 `json:"freeze_flag"`

	// 证书生成方式:  - **GENERATE** : PCA系统生成;  - **IMPORT** : 外部导入;  - **CSR** : 外部提供CSR,内部CA进行签发,即私钥不在PCA进行托管。
	GenMode string `json:"gen_mode"`

	// 证书序列号。
	SerialNumber string `json:"serial_number"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	CreateTime int64 `json:"create_time"`

	// 证书删除时间,格式为时间戳(毫秒级)。
	DeleteTime int64 `json:"delete_time"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	NotBefore int64 `json:"not_before"`

	// 证书到期时间,格式为时间戳(毫秒级)。
	NotAfter int64 `json:"not_after"`

	DistinguishedName *DistinguishedName `json:"distinguished_name"`

	CrlConfiguration *ListCrlConfiguration `json:"crl_configuration"`
}

func (CertificateAuthorities) String

func (o CertificateAuthorities) String() string

type Certificates

type Certificates struct {

	// 私有证书ID。
	CertificateId string `json:"certificate_id"`

	// 证书状态:   - **ISSUED** : 已签发;   - **EXPIRED** : 已过期;   - **REVOKED** : 已吊销。
	Status string `json:"status"`

	// 父CA证书ID。
	IssuerId string `json:"issuer_id"`

	// 父CA证书名称。
	IssuerName string `json:"issuer_name"`

	// 密钥算法。
	KeyAlgorithm string `json:"key_algorithm"`

	// 签名算法。
	SignatureAlgorithm string `json:"signature_algorithm"`

	// 冻结标识:   - **0** : 非冻结状态;   - **其它值** : 冻结状态,当前预留。
	FreezeFlag int32 `json:"freeze_flag"`

	// 证书生成方式:  - **GENERATE** : PCA系统生成;  - **IMPORT** : 外部导入;  - **CSR** : 外部提供CSR,内部CA进行签发,即私钥不在PCA进行托管。
	GenMode string `json:"gen_mode"`

	// 序列号。
	SerialNumber string `json:"serial_number"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	CreateTime int64 `json:"create_time"`

	// 证书删除时间,格式为时间戳(毫秒级)。
	DeleteTime int64 `json:"delete_time"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	NotBefore int64 `json:"not_before"`

	// 证书到期时间,格式为时间戳(毫秒级)。
	NotAfter int64 `json:"not_after"`

	DistinguishedName *DistinguishedName `json:"distinguished_name"`

	EncCertInfo *EncCertInfo `json:"enc_cert_info,omitempty"`
}

func (Certificates) String

func (o Certificates) String() string

type CreateCertificateAuthorityObsAgencyRequest

type CreateCertificateAuthorityObsAgencyRequest struct {
}

Request Object

func (CreateCertificateAuthorityObsAgencyRequest) String

type CreateCertificateAuthorityObsAgencyResponse

type CreateCertificateAuthorityObsAgencyResponse struct {

	// 创建OBS委托,由IAM返回的授权ID。
	AgencyId       *string `json:"agency_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateCertificateAuthorityObsAgencyResponse) String

type CreateCertificateAuthorityRequest

type CreateCertificateAuthorityRequest struct {
	Body *CreateCertificateAuthorityRequestBody `json:"body,omitempty"`
}

Request Object

func (CreateCertificateAuthorityRequest) String

type CreateCertificateAuthorityRequestBody

type CreateCertificateAuthorityRequestBody struct {

	// 创建的CA类型。 - **ROOT** : 根CA - **SUBORDINATE** : 从属CA
	Type string `json:"type"`

	DistinguishedName *DistinguishedName `json:"distinguished_name"`

	// 密钥算法,可选值如下:   - **RSA2048** : RSA算法,密钥长度2048位;   - **RSA4096** : RSA算法,密钥长度4096位;   - **EC256** : 椭圆曲线算法(Elliptic Curve Digital Signature Algorithm (ECDSA)),密钥长度256位;   - **EC384** : 椭圆曲线算法(Elliptic Curve Digital Signature Algorithm (ECDSA)),密钥长度384位;   - **SM2** : 国家密码管理局颁发的椭圆曲线算法(签名哈希算法SM3),密钥长度256位。(中国站)
	KeyAlgorithm string `json:"key_algorithm"`

	Validity *Validity `json:"validity,omitempty"`

	// 父CA证书ID,分以下三种情况:   - 创建根CA,根CA为自签名证书,无父CA,将忽略该参数;   - 创建从属CA,并需要直接激活该证书,为必填值;   - 创建从属CA,不需要直接激活该证书,本参数值将被忽略,激活证书时需要再次传入。
	IssuerId *string `json:"issuer_id,omitempty"`

	// CA证书路径长度,分以下三种情况:   - 创建根CA,为便于后期对证书层级的扩展,根CA默认不对路径长度做限制,故将忽略该参数。证书层级规划可由从属CA做限制;   - 创建从属CA,并需要直接激活该证书,用户可自定义。缺省值为0;   - 创建从属CA,不需要直接激活该证书,本参数值将被忽略。激活证书时若要自定义,需要再次传入;
	PathLength *int32 `json:"path_length,omitempty"`

	// 签名哈希算法。 - 分以下三种情况:   - 创建根CA,为必填值;   - 创建从属CA,并需要直接激活该证书,为必填值;   - 创建从属CA,不需要直接激活该证书,本参数值将被忽略,激活证书时需要再次传入。 - 可选值如下:   - **SHA256**   - **SHA384**   - **SHA512**   - **SM3**(中国站)
	SignatureAlgorithm *string `json:"signature_algorithm,omitempty"`

	// 密钥用法,具体标准参见RFC 5280中:[4.2.1.3节](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3)。   - **digitalSignature** : 数字签名;   - **nonRepudiation** : 不可抵赖;   - **keyEncipherment** : 密钥用于加密密钥数据;   - **dataEncipherment** : 用于加密数据;   - **keyAgreement** : 密钥协商;   - **keyCertSign** : 签发证书;   - **cRLSign** : 签发吊销列表;   - **encipherOnly** : 仅用于加密;   - **decipherOnly** : 仅用于解密。 > 缺省值如下: > - 根CA证书:默认为**[digitalSignature,keyCertSign,cRLSign]**,忽略用户传入值; > - 从属CA证书:默认为**[digitalSignature,keyCertSign,cRLSign]**,支持用户自定义。
	KeyUsages *[]string `json:"key_usages,omitempty"`

	CrlConfiguration *CrlConfiguration `json:"crl_configuration,omitempty"`
}

func (CreateCertificateAuthorityRequestBody) String

type CreateCertificateAuthorityResponse

type CreateCertificateAuthorityResponse struct {

	// 当前签发的CA证书ID。
	CaId           *string `json:"ca_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateCertificateAuthorityResponse) String

type CreateCertificateByCsrRequest

type CreateCertificateByCsrRequest struct {
	Body *CreateCertificateByCsrRequestBody `json:"body,omitempty"`
}

Request Object

func (CreateCertificateByCsrRequest) String

type CreateCertificateByCsrRequestBody

type CreateCertificateByCsrRequestBody struct {

	// 父CA证书ID。
	IssuerId string `json:"issuer_id"`

	// 证书签名请求。请使用“\\r\\n”或“\\n”替代证书签名请求中的换行符,若通过console端请求此接口,则无需做符号转换。
	Csr string `json:"csr"`

	Validity *Validity `json:"validity"`

	// 证书类型,用于区分从属CA与私有证书。   - **ENTITY_CERT** : 签发私有证书,为缺省值;   - **INTERMEDIATE_CA** : 签发从属CA。
	Type *string `json:"type,omitempty"`

	// 路径长度,仅当签发从属CA时有效。
	PathLength *int32 `json:"path_length,omitempty"`

	// 主体备用名称(本接口预留参数,当前在后端被忽略),详情请参见**SubjectAlternativeName**字段数据结构说明。
	SubjectAlternativeNames *[]SubjectAlternativeName `json:"subject_alternative_names,omitempty"`
}

func (CreateCertificateByCsrRequestBody) String

type CreateCertificateByCsrResponse

type CreateCertificateByCsrResponse struct {

	// 当前签发的证书ID。
	CertificateId  *string `json:"certificate_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateCertificateByCsrResponse) String

type CreateCertificateRequest

type CreateCertificateRequest struct {
	Body *CreateCertificateRequestBody `json:"body,omitempty"`
}

Request Object

func (CreateCertificateRequest) String

func (o CreateCertificateRequest) String() string

type CreateCertificateRequestBody

type CreateCertificateRequestBody struct {

	// 父CA证书ID。
	IssuerId string `json:"issuer_id"`

	// 密钥算法,可选值如下:   - **RSA2048** : RSA算法,密钥长度2048位;   - **RSA4096** : RSA算法,密钥长度4096位;   - **EC256** : 椭圆曲线算法(Elliptic Curve Digital Signature Algorithm (ECDSA)),密钥长度256位;   - **EC384** : 椭圆曲线算法(Elliptic Curve Digital Signature Algorithm (ECDSA)),密钥长度384位;   - **SM2** : 国家密码管理局颁发的椭圆曲线算法(签名哈希算法SM3),密钥长度256位。(中国站)
	KeyAlgorithm string `json:"key_algorithm"`

	// 签名哈希算法,可选值如下:   - **SHA256**   - **SHA384**   - **SHA512**   - **SM3**(中国站)
	SignatureAlgorithm string `json:"signature_algorithm"`

	DistinguishedName *CertDistinguishedName `json:"distinguished_name"`

	Validity *Validity `json:"validity"`

	// 密钥用法,具体标准参见RFC 5280中:[4.2.1.3节](https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.3)。   - **digitalSignature** : 数字签名;   - **nonRepudiation** : 不可抵赖;   - **keyEncipherment** : 密钥用于加密密钥数据;   - **dataEncipherment** : 用于加密数据;   - **keyAgreement** : 密钥协商;   - **keyCertSign** : 签发证书;   - **cRLSign** : 签发吊销列表;   - **encipherOnly** : 仅用于加密;   - **decipherOnly** : 仅用于解密。
	KeyUsages *[]string `json:"key_usages,omitempty"`

	// 主体备用名称,详情请参见**SubjectAlternativeName**字段数据结构说明。   - array大小:[0,20]。
	SubjectAlternativeNames *[]SubjectAlternativeName `json:"subject_alternative_names,omitempty"`

	ExtendedKeyUsage *ExtendedKeyUsage `json:"extended_key_usage,omitempty"`

	CustomizedExtension *CustomizedExtension `json:"customized_extension,omitempty"`
}

func (CreateCertificateRequestBody) String

type CreateCertificateResponse

type CreateCertificateResponse struct {

	// 当前签发的证书ID。
	CertificateId  *string `json:"certificate_id,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (CreateCertificateResponse) String

func (o CreateCertificateResponse) String() string

type CrlConfiguration

type CrlConfiguration struct {

	// 是否启用CRL发布功能。 - **true** - **false**
	Enabled bool `json:"enabled"`

	// 吊销列表文件名称。 > 若用户不指定,系统将默认采用当前证书的父CA ID。
	CrlName *string `json:"crl_name,omitempty"`

	// OBS桶名称。 > 当需要启用CRL发布功能: > - 此参数为必填项,且用户必须已创建委托授权,授予PCA服务对OBS的相关权限,具体参见本文档:**证书吊销处理>查看是否具有委托权限**、**证书吊销处理>创建委托**; > - 指定的OBS桶必须存在,否则将报错。
	ObsBucketName *string `json:"obs_bucket_name,omitempty"`

	// CRL更新周期,单位为\"天\"。当启用CRL发布功能,为必填项。
	ValidDays *int32 `json:"valid_days,omitempty"`
}

func (CrlConfiguration) String

func (o CrlConfiguration) String() string

type CustomizedExtension

type CustomizedExtension struct {

	// 对象标识符。 > 本参数需要满足ASN1规范的点分十进制符号格式的字符串,如1.3.6.1.4.1.2011.4.99。
	ObjectIdentifier *string `json:"object_identifier,omitempty"`

	// 自定义属性内容。
	Value *string `json:"value,omitempty"`
}

func (CustomizedExtension) String

func (o CustomizedExtension) String() string

type DeleteCertificateAuthorityRequest

type DeleteCertificateAuthorityRequest struct {

	// 所要计划删除的CA证书ID。
	CaId string `json:"ca_id"`

	// 延迟删除时间,单位为”天“。
	PendingDays string `json:"pending_days"`
}

Request Object

func (DeleteCertificateAuthorityRequest) String

type DeleteCertificateAuthorityResponse

type DeleteCertificateAuthorityResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (DeleteCertificateAuthorityResponse) String

type DeleteCertificateRequest

type DeleteCertificateRequest struct {

	// 所要删除的私有证书ID。
	CertificateId string `json:"certificate_id"`
}

Request Object

func (DeleteCertificateRequest) String

func (o DeleteCertificateRequest) String() string

type DeleteCertificateResponse

type DeleteCertificateResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (DeleteCertificateResponse) String

func (o DeleteCertificateResponse) String() string

type DisableCertificateAuthorityCrlRequest added in v0.1.23

type DisableCertificateAuthorityCrlRequest struct {

	// 所要禁用CRL的CA证书ID。
	CaId string `json:"ca_id"`
}

Request Object

func (DisableCertificateAuthorityCrlRequest) String added in v0.1.23

type DisableCertificateAuthorityCrlResponse added in v0.1.23

type DisableCertificateAuthorityCrlResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (DisableCertificateAuthorityCrlResponse) String added in v0.1.23

type DisableCertificateAuthorityRequest

type DisableCertificateAuthorityRequest struct {

	// 所要禁用CA证书ID。
	CaId string `json:"ca_id"`
}

Request Object

func (DisableCertificateAuthorityRequest) String

type DisableCertificateAuthorityResponse

type DisableCertificateAuthorityResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (DisableCertificateAuthorityResponse) String

type DistinguishedName

type DistinguishedName struct {

	// 证书通用名称(CN)。
	CommonName string `json:"common_name"`

	// 国家编码,需符合正则\"**[A-Za-z]{2}**\"。
	Country string `json:"country"`

	// 省市名称。
	State string `json:"state"`

	// 地区名称。
	Locality string `json:"locality"`

	// 组织名称。
	Organization string `json:"organization"`

	// 组织单元名称。
	OrganizationalUnit string `json:"organizational_unit"`
}

func (DistinguishedName) String

func (o DistinguishedName) String() string

type EnableCertificateAuthorityCrlRequest added in v0.1.23

type EnableCertificateAuthorityCrlRequest struct {

	// 所要启用CRL的CA证书ID。
	CaId string `json:"ca_id"`

	Body *EnableCertificateAuthorityCrlRequestBody `json:"body,omitempty"`
}

Request Object

func (EnableCertificateAuthorityCrlRequest) String added in v0.1.23

type EnableCertificateAuthorityCrlRequestBody added in v0.1.23

type EnableCertificateAuthorityCrlRequestBody struct {

	// 吊销列表文件名称。 > 若用户不指定,系统将默认采用当前证书的父CA ID。
	CrlName *string `json:"crl_name,omitempty"`

	// OBS桶名称。 > - 用户必须已创建委托授权,授予PCA服务对OBS的相关权限,具体参见本文档:**证书吊销处理>查看是否具有委托权限**、**证书吊销处理>创建委托**; > - 指定的OBS桶必须存在,否则将报错。
	ObsBucketName string `json:"obs_bucket_name"`

	// CRL更新周期,单位为\"天\"。
	ValidDays int32 `json:"valid_days"`
}

func (EnableCertificateAuthorityCrlRequestBody) String added in v0.1.23

type EnableCertificateAuthorityCrlResponse added in v0.1.23

type EnableCertificateAuthorityCrlResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (EnableCertificateAuthorityCrlResponse) String added in v0.1.23

type EnableCertificateAuthorityRequest

type EnableCertificateAuthorityRequest struct {

	// 所要启用的CA证书ID。
	CaId string `json:"ca_id"`
}

Request Object

func (EnableCertificateAuthorityRequest) String

type EnableCertificateAuthorityResponse

type EnableCertificateAuthorityResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (EnableCertificateAuthorityResponse) String

type EncCertInfo added in v0.1.23

type EncCertInfo struct {

	// 加密证书序列号。
	EncSerialNumber string `json:"enc_serial_number"`
}

func (EncCertInfo) String added in v0.1.23

func (o EncCertInfo) String() string

type ExportCertificateAuthorityCertificateRequest

type ExportCertificateAuthorityCertificateRequest struct {

	// 所要导出的CA证书ID。
	CaId string `json:"ca_id"`
}

Request Object

func (ExportCertificateAuthorityCertificateRequest) String

type ExportCertificateAuthorityCertificateResponse

type ExportCertificateAuthorityCertificateResponse struct {

	// 证书内容。  >  - 通过API请求本接口,证书内容中换行符已使用\"\\r\\n\"代替;  >  - 通过console端导出证书,将得到标准的PEM格式的证书文件。
	Certificate *string `json:"certificate,omitempty"`

	// 证书链内容,证书链中排列顺序(从上至下):中间证书>...>根证书。 >  - 通过API请求本接口,证书链内容中换行符已使用\"\\r\\n\"代替; >  - 通过console端导出证书链,将得到标准的PEM格式的证书链文件。
	CertificateChain *string `json:"certificate_chain,omitempty"`
	HttpStatusCode   int     `json:"-"`
}

Response Object

func (ExportCertificateAuthorityCertificateResponse) String

type ExportCertificateAuthorityCsrRequest

type ExportCertificateAuthorityCsrRequest struct {

	// 未激活的从属CA证书ID。
	CaId string `json:"ca_id"`
}

Request Object

func (ExportCertificateAuthorityCsrRequest) String

type ExportCertificateAuthorityCsrResponse

type ExportCertificateAuthorityCsrResponse struct {

	// 证书签名请求内容,有以下两种情况:   - 通过API请求本接口,证书签名请求中换行符已使用\"\\r\\n\"代替;   - 通过console端导出证书签名请求,将得到标准的PEM格式的证书签名请求文件。
	Csr            *string `json:"csr,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ExportCertificateAuthorityCsrResponse) String

type ExportCertificateRequest

type ExportCertificateRequest struct {

	// 所要导出的私有证书ID。
	CertificateId string `json:"certificate_id"`

	Body *ExportCertificateRequestBody `json:"body,omitempty"`
}

Request Object

func (ExportCertificateRequest) String

func (o ExportCertificateRequest) String() string

type ExportCertificateRequestBody

type ExportCertificateRequestBody struct {

	// 是否压缩。   - **true**   - **false**
	IsCompressed string `json:"is_compressed"`

	// 根据服务器类型选择下载证书的形式,支持以下五种类型:   - **APACHE** : apache服务器推荐使用此参数;   - **NGINX** : nginx服务器推荐使用此参数;   - **IIS** : windows服务器推荐使用此参数;   - **TOMCAT** : tomcat服务器推荐使用此参数;   - **OTHER** : 下载PEM格式证书,推荐使用此参数。
	Type string `json:"type"`

	// 是否国密GMT0009标准规范。当证书算法为SM2时传入才有效,若不传入,则默认为false。   - **true**   - **false**
	IsSmStandard *string `json:"is_sm_standard,omitempty"`

	// 设置用于加密私钥的密码。支持使用英文大小写字母、数字、特殊字符(例如,.+-_#)等。最大长度为32字节,若不传入,则默认不使用加密导出。
	Password *string `json:"password,omitempty"`
}

func (ExportCertificateRequestBody) String

type ExportCertificateResponse

type ExportCertificateResponse struct {

	// 私钥内容。
	PrivateKey *string `json:"private_key,omitempty"`

	// 证书内容。
	Certificate *string `json:"certificate,omitempty"`

	// 证书链内容。
	CertificateChain *string `json:"certificate_chain,omitempty"`

	// 加密证书内容。
	EncCertificate *string `json:"enc_certificate,omitempty"`

	// 加密私钥内容。
	EncPrivateKey *string `json:"enc_private_key,omitempty"`

	// 加密私钥的国密GMT0009标准规范SM2数字信封。
	EncSm2EnvelopedKey *string `json:"enc_sm2_enveloped_key,omitempty"`
	HttpStatusCode     int     `json:"-"`
}

Response Object

func (ExportCertificateResponse) String

func (o ExportCertificateResponse) String() string

type ExtendedKeyUsage

type ExtendedKeyUsage struct {

	// 服务器身份验证,OID为:1.3.6.1.5.5.7.3.1。 - **true** - **false** > 服务器证书请启用本增强型密钥用法,默认为false。
	ServerAuth *bool `json:"server_auth,omitempty"`

	// 客户端身份验证,OID为:1.3.6.1.5.5.7.3.2。 - **true** - **false** > 客户端证书请启用本增强型密钥用法,默认为false。
	ClientAuth *bool `json:"client_auth,omitempty"`

	// 代码签名,OID为:1.3.6.1.5.5.7.3.3。 - **true** - **false** > 签署可下载的可执行代码客户端认证,默认为false。
	CodeSigning *bool `json:"code_signing,omitempty"`

	// 安全电子邮件,OID为:1.3.6.1.5.5.7.3.4。 - **true** - **false** > 电子邮件保护,默认为false。
	EmailProtection *bool `json:"email_protection,omitempty"`

	// 时间戳,OID为:1.3.6.1.5.5.7.3.8。 - **true** - **false** > 将一个对象的哈希绑定到一个时间,默认为false。
	TimeStamping *bool `json:"time_stamping,omitempty"`
}

func (ExtendedKeyUsage) String

func (o ExtendedKeyUsage) String() string

type ImportCertificateAuthorityCertificateRequest

type ImportCertificateAuthorityCertificateRequest struct {

	// 所要导入的CA证书ID。
	CaId string `json:"ca_id"`

	Body *ImportCertificateAuthorityCertificateRequestBody `json:"body,omitempty"`
}

Request Object

func (ImportCertificateAuthorityCertificateRequest) String

type ImportCertificateAuthorityCertificateRequestBody

type ImportCertificateAuthorityCertificateRequestBody struct {

	// 证书内容。
	Certificate string `json:"certificate"`

	// 证书链内容。
	CertificateChain *string `json:"certificate_chain,omitempty"`
}

func (ImportCertificateAuthorityCertificateRequestBody) String

type ImportCertificateAuthorityCertificateResponse

type ImportCertificateAuthorityCertificateResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (ImportCertificateAuthorityCertificateResponse) String

type IssueCertificateAuthorityCertificateRequest

type IssueCertificateAuthorityCertificateRequest struct {

	// 所要激活的从属CA证书ID。
	CaId string `json:"ca_id"`

	Body *IssueCertificateAuthorityCertificateRequestBody `json:"body,omitempty"`
}

Request Object

func (IssueCertificateAuthorityCertificateRequest) String

type IssueCertificateAuthorityCertificateRequestBody

type IssueCertificateAuthorityCertificateRequestBody struct {

	// 父CA证书ID。
	IssuerId string `json:"issuer_id"`

	// 路径长度。
	PathLength int32 `json:"path_length"`

	// 签名哈希算法,可选值如下:   - **SHA256**   - **SHA384**   - **SHA512**   - **SM3**(中国站)
	SignatureAlgorithm string `json:"signature_algorithm"`

	Validity *Validity `json:"validity"`
}

func (IssueCertificateAuthorityCertificateRequestBody) String

type IssueCertificateAuthorityCertificateResponse

type IssueCertificateAuthorityCertificateResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (IssueCertificateAuthorityCertificateResponse) String

type ListCertificateAuthorityObsBucketRequest

type ListCertificateAuthorityObsBucketRequest struct {
}

Request Object

func (ListCertificateAuthorityObsBucketRequest) String

type ListCertificateAuthorityObsBucketResponse

type ListCertificateAuthorityObsBucketResponse struct {

	// OBS桶总数。
	Total *int32 `json:"total,omitempty"`

	// OBS桶列表,详情请参见**ObsBuckets**字段数据结构说明。
	ObsBuckets     *[]ObsBuckets `json:"obs_buckets,omitempty"`
	HttpStatusCode int           `json:"-"`
}

Response Object

func (ListCertificateAuthorityObsBucketResponse) String

type ListCertificateAuthorityRequest

type ListCertificateAuthorityRequest struct {

	// 指定查询返回记录条数,默认值10。
	Limit *int32 `json:"limit,omitempty"`

	// CA证书名称(CN)过滤值,用于获取名称中带有特定值的CA证书集合。
	Name *string `json:"name,omitempty"`

	// 索引位置,从offset指定的下一条数据开始查询。默认值为0。
	Offset *int32 `json:"offset,omitempty"`

	// CA证书状态,通过状态过滤证书集合: - **PENDING** : 待激活,此状态下,不可用于签发证书; - **ACTIVED** : 已激活,此状态下,可用于签发证书; - **DISABLED** : 已禁用,此状态下,不可用于签发证书; - **DELETED** : 计划删除,此状态下,不可用于签发证书; - **EXPIRED** : 已过期,此状态下,不可用于签发证书。
	Status *string `json:"status,omitempty"`

	// CA证书类型: - **ROOT** : 根CA证书 - **SUBORDINATE** : 从属CA证书
	Type *string `json:"type,omitempty"`

	// 排序属性,目前支持以下属性: - **create_time** : 证书创建时间(默认) - **common_name** : 证书名称 - **type** : CA证书类型 - **not_after** : 证书到期时间
	SortKey *string `json:"sort_key,omitempty"`

	// 排序方向,支持以下值: - **DESC** : 降序(默认) - **ASC** : 升序
	SortDir *string `json:"sort_dir,omitempty"`
}

Request Object

func (ListCertificateAuthorityRequest) String

type ListCertificateAuthorityResponse

type ListCertificateAuthorityResponse struct {

	// CA证书总数。
	Total *int32 `json:"total,omitempty"`

	// CA列表,详情请参见**CertificateAuthorities**字段数据结构说明。
	CertificateAuthorities *[]CertificateAuthorities `json:"certificate_authorities,omitempty"`
	HttpStatusCode         int                       `json:"-"`
}

Response Object

func (ListCertificateAuthorityResponse) String

type ListCertificateRequest

type ListCertificateRequest struct {

	// 指定查询返回记录条数,默认值10。
	Limit *int32 `json:"limit,omitempty"`

	// 私有证书名称,返回名称带有name字段的证书集合。
	Name *string `json:"name,omitempty"`

	// 索引位置,从offset指定的下一条数据开始查询。
	Offset *int32 `json:"offset,omitempty"`

	// 私有证书状态,通过状态过滤证书集合。   - **ISSUED** : 已签发;   - **REVOKED** : 已吊销;   - **EXPIRED** : 已过期。
	Status *string `json:"status,omitempty"`

	// 排序属性,目前支持以下属性: - **create_time** : 证书创建时间(默认) - **common_name** : 证书名称 - **issuer_name** : 签发CA名称 - **not_after** : 证书到期时间
	SortKey *string `json:"sort_key,omitempty"`

	// 排序方向,支持以下值:   - **DESC** : 降序(默认)   - **ASC** : 升序
	SortDir *string `json:"sort_dir,omitempty"`
}

Request Object

func (ListCertificateRequest) String

func (o ListCertificateRequest) String() string

type ListCertificateResponse

type ListCertificateResponse struct {

	// 私有证书总数。
	Total *int32 `json:"total,omitempty"`

	// 证书列表,详情请参见**Certificates**字段数据结构说明。
	Certificates   *[]Certificates `json:"certificates,omitempty"`
	HttpStatusCode int             `json:"-"`
}

Response Object

func (ListCertificateResponse) String

func (o ListCertificateResponse) String() string

type ListCrlConfiguration

type ListCrlConfiguration struct {

	// 是否启用CRL发布功能。 - **true** - **false**
	Enabled bool `json:"enabled"`

	// 吊销列表文件名称。 > 若用户不指定,系统将默认采用当前证书的父CA ID。
	CrlName string `json:"crl_name"`

	// OBS桶名称。
	ObsBucketName string `json:"obs_bucket_name"`

	// CRL更新周期,单位为\"天\"。当启用CRL发布功能,为必填项。
	ValidDays int32 `json:"valid_days"`

	// 吊销列表分发地址,即对应的OBS桶中的CRL文件地址。 > 本参数由程序根据crl_name、obs_bucket_name以及OBS地址进行拼接而成。
	CrlDisPoint string `json:"crl_dis_point"`
}

func (ListCrlConfiguration) String

func (o ListCrlConfiguration) String() string

type ObsBuckets

type ObsBuckets struct {

	// 桶名称。
	BucketName string `json:"bucket_name"`

	// 创建时间,格式为时间戳(毫秒级)。
	CreateTime int64 `json:"create_time"`
}

func (ObsBuckets) String

func (o ObsBuckets) String() string

type ParseCertificateSigningRequestRequest

type ParseCertificateSigningRequestRequest struct {
	Body *ParseCertificateSigningRequestRequestBody `json:"body,omitempty"`
}

Request Object

func (ParseCertificateSigningRequestRequest) String

type ParseCertificateSigningRequestRequestBody

type ParseCertificateSigningRequestRequestBody struct {

	// 证书签名请求。请使用“\\r\\n”或“\\n”替代证书签名请求中的换行符,若通过console端请求此接口,则无需做符号转换。
	Csr string `json:"csr"`
}

func (ParseCertificateSigningRequestRequestBody) String

type ParseCertificateSigningRequestResponse

type ParseCertificateSigningRequestResponse struct {

	// 密钥算法。
	KeyAlgorithm *string `json:"key_algorithm,omitempty"`

	// 密钥算法长度,单位为bit。
	KeyAlgorithmLength *string `json:"key_algorithm_length,omitempty"`

	// 签名算法,带具体的签名与哈希算法,如\"SHA256withRSA\"。
	SignatureAlgorithm *string `json:"signature_algorithm,omitempty"`

	// 公钥内容。 > 其中,换行符已被“\\r\\n”替代;
	PublicKey *string `json:"public_key,omitempty"`

	DistinguishedName *DistinguishedName `json:"distinguished_name,omitempty"`
	HttpStatusCode    int                `json:"-"`
}

Response Object

func (ParseCertificateSigningRequestResponse) String

type Quotas

type Quotas struct {

	// 资源配额列表,详情请参见**Resources**字段数据结构说明。
	Resources []Resources `json:"resources"`
}

func (Quotas) String

func (o Quotas) String() string

type Resources

type Resources struct {

	// 证书类型:  - **CERTIFICATE_AUTHORITY**: CA证书;  - **CERTIFICATE**: 私有证书。
	Type string `json:"type"`

	// 已使用配额数。
	Used int32 `json:"used"`

	// 配额总数:   - **CERTIFICATE_AUTHORITY**: 当前系统指定100;   - **CERTIFICATE**: 当前系统指定100000。
	Quota int32 `json:"quota"`
}

func (Resources) String

func (o Resources) String() string

type RestoreCertificateAuthorityRequest

type RestoreCertificateAuthorityRequest struct {

	// 所需要恢复的CA证书ID。
	CaId string `json:"ca_id"`
}

Request Object

func (RestoreCertificateAuthorityRequest) String

type RestoreCertificateAuthorityResponse

type RestoreCertificateAuthorityResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (RestoreCertificateAuthorityResponse) String

type RevokeCertificateAuthorityRequest

type RevokeCertificateAuthorityRequest struct {

	// 所要吊销的子CA ID。
	CaId string `json:"ca_id"`

	Body *RevokeCertificateRequestBody `json:"body,omitempty"`
}

Request Object

func (RevokeCertificateAuthorityRequest) String

type RevokeCertificateAuthorityResponse

type RevokeCertificateAuthorityResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (RevokeCertificateAuthorityResponse) String

type RevokeCertificateRequest

type RevokeCertificateRequest struct {

	// 所要吊销的私有证书ID。
	CertificateId string `json:"certificate_id"`

	Body *RevokeCertificateRequestBody `json:"body,omitempty"`
}

Request Object

func (RevokeCertificateRequest) String

func (o RevokeCertificateRequest) String() string

type RevokeCertificateRequestBody

type RevokeCertificateRequestBody struct {

	// 吊销理由,支持以下选项:   - **UNSPECIFIED** : 吊销时未指定吊销原因,为默认值;   - **KEY_COMPROMISE** : 证书密钥材料泄露;   - **CERTIFICATE_AUTHORITY_COMPROMISE** : 颁发路径上,可能存在CA密钥材料泄露;   - **AFFILIATION_CHANGED** : 证书中的主体或其他信息已经被改变;   - **SUPERSEDED** : 此证书已被取代;   - **CESSATION_OF_OPERATION** : 此证书或颁发路径中的实体已停止运营;   - **CERTIFICATE_HOLD** : 该证书当前不应被视为有效,预计将来可能会生效;   - **PRIVILEGE_WITHDRAWN** : 此证书不再具备其声明的属性的权限;   - **ATTRIBUTE_AUTHORITY_COMPROMISE** : 担保此证书属性的机构可能已受到损害。 > 当不想填写吊销理由时,请求body体请置为\"{}\",否则将会报异常,默认值为UNSPECIFIED。
	Reason *string `json:"reason,omitempty"`
}

func (RevokeCertificateRequestBody) String

type RevokeCertificateResponse

type RevokeCertificateResponse struct {
	HttpStatusCode int `json:"-"`
}

Response Object

func (RevokeCertificateResponse) String

func (o RevokeCertificateResponse) String() string

type ShowCertificateAuthorityObsAgencyRequest

type ShowCertificateAuthorityObsAgencyRequest struct {
}

Request Object

func (ShowCertificateAuthorityObsAgencyRequest) String

type ShowCertificateAuthorityObsAgencyResponse

type ShowCertificateAuthorityObsAgencyResponse struct {

	// OBS当前的授权结果。 - **true** - **false**
	AgencyGranted  *string `json:"agency_granted,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowCertificateAuthorityObsAgencyResponse) String

type ShowCertificateAuthorityQuotaRequest

type ShowCertificateAuthorityQuotaRequest struct {
}

Request Object

func (ShowCertificateAuthorityQuotaRequest) String

type ShowCertificateAuthorityQuotaResponse

type ShowCertificateAuthorityQuotaResponse struct {
	Quotas         *Quotas `json:"quotas,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowCertificateAuthorityQuotaResponse) String

type ShowCertificateAuthorityRequest

type ShowCertificateAuthorityRequest struct {

	// CA证书ID。
	CaId string `json:"ca_id"`
}

Request Object

func (ShowCertificateAuthorityRequest) String

type ShowCertificateAuthorityResponse

type ShowCertificateAuthorityResponse struct {

	// CA证书ID。
	CaId *string `json:"ca_id,omitempty"`

	// CA类型:   - **ROOT**: 根CA   - **SUBORDINATE**: 从属CA
	Type *string `json:"type,omitempty"`

	// CA证书状态:   - **PENDING** : 待激活,此状态下,不可用于签发证书;   - **ACTIVED** : 已激活,此状态下,可用于签发证书;   - **DISABLED** : 已禁用,此状态下,不可用于签发证书;   - **DELETED** : 计划删除,此状态下,不可用于签发证书;   - **EXPIRED** : 已过期,此状态下,不可用于签发证书。
	Status *string `json:"status,omitempty"`

	// CA路径长度。 > 注:生成的根CA证书,其路径长度不做限制,但本字段在数据库中统一置为7。从属CA的路径长度在创建时由用户指定,缺省值为0。
	PathLength *int32 `json:"path_length,omitempty"`

	// 父CA证书ID,即签发此证书的CA证书ID。根CA中,此参数为**null**。
	IssuerId *string `json:"issuer_id,omitempty"`

	// 父CA证书名称。根CA中,此参数为**null**。
	IssuerName *string `json:"issuer_name,omitempty"`

	// 密钥算法。
	KeyAlgorithm *string `json:"key_algorithm,omitempty"`

	// 签名哈希算法。
	SignatureAlgorithm *string `json:"signature_algorithm,omitempty"`

	// 冻结标识:   - **0** : 非冻结状态;   - **其它值** : 冻结状态,当前预留。
	FreezeFlag *int32 `json:"freeze_flag,omitempty"`

	// 证书生成方式:  - **GENERATE** : PCA系统生成;  - **IMPORT** : 外部导入;  - **CSR** : 外部提供CSR,内部CA进行签发,即私钥不在PCA进行托管。
	GenMode *string `json:"gen_mode,omitempty"`

	// 证书序列号。
	SerialNumber *string `json:"serial_number,omitempty"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	CreateTime *int64 `json:"create_time,omitempty"`

	// 证书删除时间,格式为时间戳(毫秒级)。
	DeleteTime *int64 `json:"delete_time,omitempty"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	NotBefore *int64 `json:"not_before,omitempty"`

	// 证书到期时间,格式为时间戳(毫秒级)。
	NotAfter *int64 `json:"not_after,omitempty"`

	DistinguishedName *DistinguishedName `json:"distinguished_name,omitempty"`

	CrlConfiguration *ListCrlConfiguration `json:"crl_configuration,omitempty"`
	HttpStatusCode   int                   `json:"-"`
}

Response Object

func (ShowCertificateAuthorityResponse) String

type ShowCertificateQuotaRequest

type ShowCertificateQuotaRequest struct {
}

Request Object

func (ShowCertificateQuotaRequest) String

type ShowCertificateQuotaResponse

type ShowCertificateQuotaResponse struct {
	Quotas         *Quotas `json:"quotas,omitempty"`
	HttpStatusCode int     `json:"-"`
}

Response Object

func (ShowCertificateQuotaResponse) String

type ShowCertificateRequest

type ShowCertificateRequest struct {

	// 需要查询的私有证书ID。
	CertificateId string `json:"certificate_id"`
}

Request Object

func (ShowCertificateRequest) String

func (o ShowCertificateRequest) String() string

type ShowCertificateResponse

type ShowCertificateResponse struct {

	// 私有证书ID。
	CertificateId *string `json:"certificate_id,omitempty"`

	// 证书状态:   - **ISSUED** : 已签发;   - **EXPIRED** : 已过期;   - **REVOKED** : 已吊销。
	Status *string `json:"status,omitempty"`

	// 父CA证书ID。
	IssuerId *string `json:"issuer_id,omitempty"`

	// 父CA证书名称。
	IssuerName *string `json:"issuer_name,omitempty"`

	// 密钥算法。
	KeyAlgorithm *string `json:"key_algorithm,omitempty"`

	// 签名算法。
	SignatureAlgorithm *string `json:"signature_algorithm,omitempty"`

	// 冻结标识:   - **0** : 非冻结状态;   - **其它值** : 冻结状态,当前预留。
	FreezeFlag *int32 `json:"freeze_flag,omitempty"`

	// 证书生成方式:  - **GENERATE** : PCA系统生成;  - **IMPORT** : 外部导入;  - **CSR** : 外部提供CSR,内部CA进行签发,即私钥不在PCA进行托管。
	GenMode *string `json:"gen_mode,omitempty"`

	// 序列号。
	SerialNumber *string `json:"serial_number,omitempty"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	CreateTime *int64 `json:"create_time,omitempty"`

	// 证书删除时间,格式为时间戳(毫秒级)。
	DeleteTime *int64 `json:"delete_time,omitempty"`

	// 证书创建时间,格式为时间戳(毫秒级)。
	NotBefore *int64 `json:"not_before,omitempty"`

	// 证书到期时间,格式为时间戳(毫秒级)。
	NotAfter *int64 `json:"not_after,omitempty"`

	DistinguishedName *DistinguishedName `json:"distinguished_name,omitempty"`

	EncCertInfo    *EncCertInfo `json:"enc_cert_info,omitempty"`
	HttpStatusCode int          `json:"-"`
}

Response Object

func (ShowCertificateResponse) String

func (o ShowCertificateResponse) String() string

type SubjectAlternativeName

type SubjectAlternativeName struct {

	// 备用名称类型,当前仅支持DNS、IP、EMAIL、URI。 - **DNS** - **IP** - **EMAIL** - **URI**
	Type string `json:"type"`

	// 对应备用名称类型的值。   - DNS类型,长度为不超过253;   - IP类型,长度不超过39,支持IPV4、IPV6;   - EMAIL类型,长度不超过256;   - URI类型,长度不超过253。
	Value string `json:"value"`
}

func (SubjectAlternativeName) String

func (o SubjectAlternativeName) String() string

type Validity

type Validity struct {

	// 有效期类型,为必填值:   - **YEAR** : 年(12个月)   - **MONTH** : 月(统一按31天)   - **DAY** : 日   - **HOUR** : 小时
	Type string `json:"type"`

	// 证书有效期值,与type对应的类型值,换算成年需满足以下规则:   - 根CA,有效期小于等于30年;   - 从属CA与私有证书,有效期小于等于20年。
	Value int32 `json:"value"`

	// 起始时间,为可选值:   - 格式为时间戳(毫秒级),如1645146939688代表2022-02-18 09:15:39;   - 不早于当前时间5分钟,即start_from > (current_time - 5min)。
	StartFrom *int32 `json:"start_from,omitempty"`
}

func (Validity) String

func (o Validity) String() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL