mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	Revert "Do some internal renaming in PKI"
This reverts commit 7ffa7deb92.
			
			
This commit is contained in:
		@@ -23,10 +23,10 @@ import (
 | 
				
			|||||||
type certUsage int
 | 
					type certUsage int
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	serverExtUsage certUsage = 1 << iota
 | 
						serverUsage certUsage = 1 << iota
 | 
				
			||||||
	clientExtUsage
 | 
						clientUsage
 | 
				
			||||||
	codeSigningExtUsage
 | 
						codeSigningUsage
 | 
				
			||||||
	emailProtectionExtUsage
 | 
						emailProtectionUsage
 | 
				
			||||||
	caUsage
 | 
						caUsage
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -682,16 +682,16 @@ func generateCreationBundle(b *backend,
 | 
				
			|||||||
	var usage certUsage
 | 
						var usage certUsage
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		if role.ServerFlag {
 | 
							if role.ServerFlag {
 | 
				
			||||||
			usage = usage | serverExtUsage
 | 
								usage = usage | serverUsage
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if role.ClientFlag {
 | 
							if role.ClientFlag {
 | 
				
			||||||
			usage = usage | clientExtUsage
 | 
								usage = usage | clientUsage
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if role.CodeSigningFlag {
 | 
							if role.CodeSigningFlag {
 | 
				
			||||||
			usage = usage | codeSigningExtUsage
 | 
								usage = usage | codeSigningUsage
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if role.EmailProtectionFlag {
 | 
							if role.EmailProtectionFlag {
 | 
				
			||||||
			usage = usage | emailProtectionExtUsage
 | 
								usage = usage | emailProtectionUsage
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -747,16 +747,16 @@ func addKeyUsages(creationInfo *creationBundle, certTemplate *x509.Certificate)
 | 
				
			|||||||
		return
 | 
							return
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if creationInfo.Usage&serverExtUsage != 0 {
 | 
						if creationInfo.Usage&serverUsage != 0 {
 | 
				
			||||||
		certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageServerAuth)
 | 
							certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageServerAuth)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if creationInfo.Usage&clientExtUsage != 0 {
 | 
						if creationInfo.Usage&clientUsage != 0 {
 | 
				
			||||||
		certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageClientAuth)
 | 
							certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageClientAuth)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if creationInfo.Usage&codeSigningExtUsage != 0 {
 | 
						if creationInfo.Usage&codeSigningUsage != 0 {
 | 
				
			||||||
		certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageCodeSigning)
 | 
							certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageCodeSigning)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if creationInfo.Usage&emailProtectionExtUsage != 0 {
 | 
						if creationInfo.Usage&emailProtectionUsage != 0 {
 | 
				
			||||||
		certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageEmailProtection)
 | 
							certTemplate.ExtKeyUsage = append(certTemplate.ExtKeyUsage, x509.ExtKeyUsageEmailProtection)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user