Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Change Certificate Manager Default Internal Certificate Lifetime

    Scheduled Pinned Locked Moved General pfSense Questions
    certificate
    2 Posts 2 Posters 875 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      Optimaximal
      last edited by Optimaximal

      As title.

      Is there a way to change the default Certificate Lifetime for new certs in Certificate Manager from 3650 days to another value?

      I've poured through the General & Advanced settings and cannot find anything obvious. If it's a Tunable, can someone advise the name & value?

      1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator
        last edited by

        You would have to edit php file used when creating cert..

        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/system_certmanager.php

        if ($act == "new") {
        	$pconfig['method'] = $_POST['method'];
        	$pconfig['keylen'] = "2048";
        	$pconfig['digest_alg'] = "sha256";
        	$pconfig['csr_keylen'] = "2048";
        	$pconfig['csr_digest_alg'] = "sha256";
        	$pconfig['csrsign_digest_alg'] = "sha256";
        	$pconfig['type'] = "user";
        	$pconfig['lifetime'] = "3650";
        }
        

        Keep in mind that would be reverted every time you updated pfsense and that file gets redone, etc.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.