Fix self-signed certificates on ubuntu + v8.0.2:

* On some Ubuntu server, the self-signed certificates generation fails:
  * See [issue #268](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues/268)
  * This prevents the bot to connect to the server
  * As a fallback, we directly call openssl to generate the certificates
This commit is contained in:
John Livingston
2023-09-27 14:29:17 +02:00
parent 05b45fe6b5
commit 5614987901
5 changed files with 96 additions and 17 deletions

View File

@ -11,6 +11,7 @@ interface ProsodyDebuggerOptions {
interface DebugContent {
renewCertCheckInterval?: number
renewSelfSignedCertInterval?: number
useOpenSSL?: boolean
logRotateCheckInterval?: number
logRotateEvery?: number
remoteServerInfosMaxAge?: number
@ -25,7 +26,7 @@ type DebugNumericValue = 'renewCertCheckInterval'
| 'logRotateCheckInterval'
| 'remoteServerInfosMaxAge'
type DebugBooleanValue = 'alwaysPublishXMPPRoom' | 'enablePodcastChatTagForNonLive'
type DebugBooleanValue = 'alwaysPublishXMPPRoom' | 'enablePodcastChatTagForNonLive' | 'useOpenSSL'
let debugContent: DebugContent | null | false = null
function _readDebugFile (options: RegisterServerOptions): DebugContent | false {
@ -58,6 +59,7 @@ function _readDebugFile (options: RegisterServerOptions): DebugContent | false {
debugContent.logRotateEvery = _getNumericOptions(options, json, 'log_rotate_every')
debugContent.renewCertCheckInterval = _getNumericOptions(options, json, 'renew_cert_check_interval')
debugContent.renewSelfSignedCertInterval = _getNumericOptions(options, json, 'renew_self_signed_cert_interval')
debugContent.useOpenSSL = json.use_openssl === true
debugContent.remoteServerInfosMaxAge = _getNumericOptions(options, json, 'remote_server_infos_max_age')
debugContent.alwaysPublishXMPPRoom = json.always_publish_xmpp_room === true
debugContent.enablePodcastChatTagForNonLive = json.enable_podcast_chat_tag_for_nonlive === true