mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-10-26 00:36:34 +02:00
feature: ssl status in list websites
This commit is contained in:
6
.idea/workspace.xml
generated
6
.idea/workspace.xml
generated
@@ -4,7 +4,9 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment="" />
|
||||
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@@ -46,7 +48,7 @@
|
||||
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"SHELLCHECK.PATH": "/Users/cyberpersons/Library/Application Support/JetBrains/PyCharm2025.1/plugins/Shell Script/shellcheck",
|
||||
"git-widget-placeholder": "v2.4.3",
|
||||
"git-widget-placeholder": "v2.4.4-dev",
|
||||
"last_opened_file_path": "/Users/cyberpersons/cyberpanel",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
|
||||
@@ -2626,8 +2626,31 @@ Require valid-user
|
||||
if cn and cn.startswith('*.'):
|
||||
is_wildcard = True
|
||||
|
||||
# Check if it's self-signed by comparing issuer and subject
|
||||
is_self_signed = False
|
||||
issuer_cn = None
|
||||
subject_cn = None
|
||||
|
||||
for component in x509.get_issuer().get_components():
|
||||
if component[0].decode('utf-8') == 'CN':
|
||||
issuer_cn = component[1].decode('utf-8')
|
||||
break
|
||||
|
||||
for component in x509.get_subject().get_components():
|
||||
if component[0].decode('utf-8') == 'CN':
|
||||
subject_cn = component[1].decode('utf-8')
|
||||
break
|
||||
|
||||
# Certificate is self-signed if issuer CN equals subject CN
|
||||
if issuer_cn and subject_cn and issuer_cn == subject_cn:
|
||||
is_self_signed = True
|
||||
|
||||
# Also check if issuer equals subject entirely
|
||||
if x509.get_issuer() == x509.get_subject():
|
||||
is_self_signed = True
|
||||
|
||||
# Determine status
|
||||
if issuer_org == 'Denial':
|
||||
if is_self_signed:
|
||||
status = 'self-signed'
|
||||
elif days < 0:
|
||||
status = 'expired'
|
||||
|
||||
Reference in New Issue
Block a user