Ajout export P12
This commit is contained in:
@@ -13,6 +13,8 @@ type CA struct {
|
||||
Country string `json:"country" bson:"country"`
|
||||
Province string `json:"province" bson:"province"`
|
||||
Locality string `json:"locality" bson:"locality"`
|
||||
StreetAddress string `json:"street_address" bson:"street_address"`
|
||||
PostalCode string `json:"postal_code" bson:"postal_code"`
|
||||
Email string `json:"email" bson:"email"`
|
||||
PrivateKey string `json:"private_key,omitempty" bson:"private_key"`
|
||||
Certificate string `json:"certificate" bson:"certificate"`
|
||||
@@ -32,6 +34,8 @@ type CreateCARequest struct {
|
||||
Country string `json:"country" binding:"required"`
|
||||
Province string `json:"province"`
|
||||
Locality string `json:"locality"`
|
||||
StreetAddress string `json:"street_address"`
|
||||
PostalCode string `json:"postal_code"`
|
||||
Email string `json:"email" binding:"omitempty,email"` // omitempty permet les chaînes vides
|
||||
KeySize int `json:"key_size" binding:"required,min=2048"`
|
||||
ValidYears int `json:"valid_years" binding:"required,min=1,max=20"`
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
type Certificate struct {
|
||||
ID string `json:"id" bson:"_id"`
|
||||
CommonName string `json:"common_name" bson:"common_name"`
|
||||
Subject string `json:"subject" bson:"subject"`
|
||||
// Subject string `json:"subject" bson:"subject"`
|
||||
DNSNames []string `json:"dns_names" bson:"dns_names"`
|
||||
IPAddresses []string `json:"ip_addresses" bson:"ip_addresses"`
|
||||
Type string `json:"type" bson:"type"` // "server" or "client"
|
||||
|
||||
Reference in New Issue
Block a user