Loading PEM
This commit is contained in:
parent
9ca647b326
commit
910c87233a
|
|
@ -1,4 +1,22 @@
|
|||
import * as fs from 'fs';
|
||||
import { RJLog } from '../log/RJLog';
|
||||
|
||||
export class FilesSync
|
||||
{
|
||||
static loadUTF8( filePath:string ):string
|
||||
{
|
||||
try
|
||||
{
|
||||
let data = fs.readFileSync( filePath );
|
||||
let stringData = data.toString();
|
||||
return stringData;
|
||||
}
|
||||
catch ( exception )
|
||||
{
|
||||
RJLog.log( exception );
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ import { Files } from "../files/Files";
|
|||
import { LocationService } from "./location/LocationService";
|
||||
import { RequestRequirement } from "./requirements/RequestRequirement";
|
||||
import { NotTooManyRequests } from "./requirements/security/NotTooManyRequests";
|
||||
import { FilesSync } from "../files/FilesSync";
|
||||
|
||||
export class UserManagementServer
|
||||
{
|
||||
|
|
@ -99,8 +100,8 @@ export class UserManagementServer
|
|||
{
|
||||
https:
|
||||
{
|
||||
key:this._settings.httpsKeyPath,
|
||||
cert:this._settings.httpsCertPath
|
||||
key:FilesSync.loadUTF8( this._settings.httpsKeyPath ),
|
||||
cert:FilesSync.loadUTF8( this._settings.httpsCertPath )
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue