再修正一个方法名中的单词错误:`Form` -> `From`
parent
fe31462c94
commit
15d4a88e15
|
@ -45,7 +45,7 @@ module.exports = class CertAndKeyContainer {
|
|||
const _resolve = (_certObj) => {
|
||||
if (once) {
|
||||
once = false
|
||||
const mappingHostNames = tlsUtils.getMappingHostNamesFormCert(_certObj.cert)
|
||||
const mappingHostNames = tlsUtils.getMappingHostNamesFromCert(_certObj.cert)
|
||||
certPromiseObj.mappingHostNames = mappingHostNames // change
|
||||
resolve(_certObj)
|
||||
}
|
||||
|
|
|
@ -90,7 +90,7 @@ module.exports = class FakeServersCenter {
|
|||
log.error(e)
|
||||
})
|
||||
fakeServer.on('listening', () => {
|
||||
const mappingHostNames = tlsUtils.getMappingHostNamesFormCert(certObj.cert)
|
||||
const mappingHostNames = tlsUtils.getMappingHostNamesFromCert(certObj.cert)
|
||||
serverPromiseObj.mappingHostNames = mappingHostNames
|
||||
resolve(serverObj)
|
||||
})
|
||||
|
|
|
@ -230,7 +230,7 @@ utils.isMappingHostName = function (DNSName, hostname) {
|
|||
return (new RegExp(reg)).test(hostname)
|
||||
}
|
||||
|
||||
utils.getMappingHostNamesFormCert = function (cert) {
|
||||
utils.getMappingHostNamesFromCert = function (cert) {
|
||||
let mappingHostNames = []
|
||||
mappingHostNames.push(cert.subject.getField('CN') ? cert.subject.getField('CN').value : '')
|
||||
const altNames = cert.getExtension('subjectAltName') ? cert.getExtension('subjectAltName').altNames : []
|
||||
|
|
Loading…
Reference in New Issue