MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / format_uptime

Function format_uptime

webapp_modern.py:16709–16720  ·  view source on GitHub ↗

Format uptime in human readable format

(seconds)

Source from the content-addressed store, hash-verified

16707 try: san.append(x509.DNSName(h))
16708 except Exception: pass
16709 for ip in ips:
16710 try: san.append(x509.IPAddress(ipaddress.ip_address(ip)))
16711 except Exception: pass
16712 cert = (x509.CertificateBuilder()
16713 .subject_name(subject).issuer_name(issuer)
16714 .public_key(key.public_key())
16715 .serial_number(x509.random_serial_number())
16716 .not_valid_before(_dt.datetime.utcnow() - _dt.timedelta(minutes=5))
16717 .not_valid_after(_dt.datetime.utcnow() + _dt.timedelta(days=365))
16718 .add_extension(x509.SubjectAlternativeName(san), critical=False)
16719 .sign(key, hashes.SHA256(), default_backend()))
16720 with open(key_path, 'wb') as f:
16721 f.write(key.private_bytes(
16722 encoding=serialization.Encoding.PEM,
16723 format=serialization.PrivateFormat.TraditionalOpenSSL,

Callers 1

get_system_status_apiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected