formatting

merge-requests/1/head
Matthew 2020-12-23 16:28:41 -05:00
parent af8d64cd35
commit 27732e63c1
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 20 additions and 20 deletions

View File

@ -87,39 +87,39 @@ func GetCertificateInfo(c *gin.Context) {
} }
} }
if certificate.KeyUsage & x509.KeyUsageCRLSign != 0 { if certificate.KeyUsage&x509.KeyUsageCRLSign != 0 {
keyUsages = append(keyUsages, 0) keyUsages = append(keyUsages, 0)
keyUsagesText = append(keyUsagesText, "CRL Signing") keyUsagesText = append(keyUsagesText, "CRL Signing")
} }
if certificate.KeyUsage & x509.KeyUsageCertSign != 0 { if certificate.KeyUsage&x509.KeyUsageCertSign != 0 {
keyUsages = append(keyUsages, 1) keyUsages = append(keyUsages, 1)
keyUsagesText = append(keyUsagesText, "Certificate Signing") keyUsagesText = append(keyUsagesText, "Certificate Signing")
} }
if certificate.KeyUsage & x509.KeyUsageContentCommitment != 0 { if certificate.KeyUsage&x509.KeyUsageContentCommitment != 0 {
keyUsages = append(keyUsages, 3) keyUsages = append(keyUsages, 3)
keyUsagesText = append(keyUsagesText, "Content Commitment") keyUsagesText = append(keyUsagesText, "Content Commitment")
} }
if certificate.KeyUsage & x509.KeyUsageDataEncipherment != 0 { if certificate.KeyUsage&x509.KeyUsageDataEncipherment != 0 {
keyUsages = append(keyUsages, 4) keyUsages = append(keyUsages, 4)
keyUsagesText = append(keyUsagesText, "Data Encipherment") keyUsagesText = append(keyUsagesText, "Data Encipherment")
} }
if certificate.KeyUsage & x509.KeyUsageDecipherOnly != 0 { if certificate.KeyUsage&x509.KeyUsageDecipherOnly != 0 {
keyUsages = append(keyUsages, 5) keyUsages = append(keyUsages, 5)
keyUsagesText = append(keyUsagesText, "Decipher Only") keyUsagesText = append(keyUsagesText, "Decipher Only")
} }
if certificate.KeyUsage & x509.KeyUsageDigitalSignature != 0 { if certificate.KeyUsage&x509.KeyUsageDigitalSignature != 0 {
keyUsages = append(keyUsages, 5) keyUsages = append(keyUsages, 5)
keyUsagesText = append(keyUsagesText, "Digital Signature") keyUsagesText = append(keyUsagesText, "Digital Signature")
} }
if certificate.KeyUsage & x509.KeyUsageEncipherOnly != 0 { if certificate.KeyUsage&x509.KeyUsageEncipherOnly != 0 {
keyUsages = append(keyUsages, 6) keyUsages = append(keyUsages, 6)
keyUsagesText = append(keyUsagesText, "Encipher Only") keyUsagesText = append(keyUsagesText, "Encipher Only")
} }
if certificate.KeyUsage & x509.KeyUsageKeyAgreement != 0 { if certificate.KeyUsage&x509.KeyUsageKeyAgreement != 0 {
keyUsages = append(keyUsages, 7) keyUsages = append(keyUsages, 7)
keyUsagesText = append(keyUsagesText, "Key Agreement") keyUsagesText = append(keyUsagesText, "Key Agreement")
} }
if certificate.KeyUsage & x509.KeyUsageKeyEncipherment != 0 { if certificate.KeyUsage&x509.KeyUsageKeyEncipherment != 0 {
keyUsages = append(keyUsages, 8) keyUsages = append(keyUsages, 8)
keyUsagesText = append(keyUsagesText, "Key Encipherment") keyUsagesText = append(keyUsagesText, "Key Encipherment")
} }