Stealing this code form the attachSubAltName function in the certificates workflow. (#655)
The function was wiping out any extensions that weren't SAN names from the authority UI.
This commit is contained in:
parent
1b6f88f6fd
commit
02cfb2d877
|
@ -14,12 +14,21 @@ angular.module('lemur')
|
|||
this.roles.splice(index, 1);
|
||||
},
|
||||
attachSubAltName: function () {
|
||||
if (this.extensions === undefined || this.extensions.subAltNames === undefined) {
|
||||
this.extensions = {'subAltNames': {'names': []}};
|
||||
if (this.extensions === undefined) {
|
||||
this.extensions = {};
|
||||
}
|
||||
|
||||
if (angular.isString(this.subAltType) && angular.isString(this.subAltValue)) {
|
||||
if (this.extensions.subAltNames === undefined) {
|
||||
this.extensions.subAltNames = {'names': []};
|
||||
}
|
||||
|
||||
if (!angular.isString(this.subAltType)) {
|
||||
this.subAltType = 'DNSName';
|
||||
}
|
||||
|
||||
if (angular.isString(this.subAltValue) && angular.isString(this.subAltType)) {
|
||||
this.extensions.subAltNames.names.push({'nameType': this.subAltType, 'value': this.subAltValue});
|
||||
//this.findDuplicates();
|
||||
}
|
||||
|
||||
this.subAltType = null;
|
||||
|
|
Loading…
Reference in New Issue