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

View File

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