Issue 688 cert templates (#689)

* subAltNames were getting wiped out every time a template was selected

* isCritical variables aren't presented in the UI, nor is this information used in determining to use them.
This commit is contained in:
Neil Schelly 2017-02-10 15:43:41 -05:00 committed by kevgliss
parent 8afcb50a39
commit 8e49194764
2 changed files with 5 additions and 8 deletions

View File

@ -166,11 +166,9 @@ angular.module('lemur')
'extensions': { 'extensions': {
'basicConstraints': {}, 'basicConstraints': {},
'keyUsage': { 'keyUsage': {
'isCritical': true,
'useDigitalSignature': true 'useDigitalSignature': true
}, },
'extendedKeyUsage': { 'extendedKeyUsage': {
'isCritical': true,
'useClientAuthentication': true 'useClientAuthentication': true
}, },
'subjectKeyIdentifier': { 'subjectKeyIdentifier': {
@ -184,12 +182,10 @@ angular.module('lemur')
'extensions' : { 'extensions' : {
'basicConstraints': {}, 'basicConstraints': {},
'keyUsage': { 'keyUsage': {
'isCritical': true,
'useKeyEncipherment': true, 'useKeyEncipherment': true,
'useDigitalSignature': true 'useDigitalSignature': true
}, },
'extendedKeyUsage': { 'extendedKeyUsage': {
'isCritical': true,
'useServerAuthentication': true 'useServerAuthentication': true
}, },
'subjectKeyIdentifier': { 'subjectKeyIdentifier': {
@ -295,11 +291,9 @@ angular.module('lemur')
'extensions': { 'extensions': {
'basicConstraints': {}, 'basicConstraints': {},
'keyUsage': { 'keyUsage': {
'isCritical': true,
'useDigitalSignature': true 'useDigitalSignature': true
}, },
'extendedKeyUsage': { 'extendedKeyUsage': {
'isCritical': true,
'useClientAuthentication': true 'useClientAuthentication': true
}, },
'subjectKeyIdentifier': { 'subjectKeyIdentifier': {
@ -313,12 +307,10 @@ angular.module('lemur')
'extensions' : { 'extensions' : {
'basicConstraints': {}, 'basicConstraints': {},
'keyUsage': { 'keyUsage': {
'isCritical': true,
'useKeyEncipherment': true, 'useKeyEncipherment': true,
'useDigitalSignature': true 'useDigitalSignature': true
}, },
'extendedKeyUsage': { 'extendedKeyUsage': {
'isCritical': true,
'useServerAuthentication': true 'useServerAuthentication': true
}, },
'subjectKeyIdentifier': { 'subjectKeyIdentifier': {

View File

@ -107,7 +107,12 @@ angular.module('lemur')
}); });
}, },
useTemplate: function () { useTemplate: function () {
var saveSubAltNames = {};
if (this.extensions && this.extensions.subAltNames) {
saveSubAltNames = this.extensions.subAltNames;
}
this.extensions = this.template.extensions; this.extensions = this.template.extensions;
this.extensions.subAltNames = saveSubAltNames;
} }
}); });
}); });