#!/usr/bin/env python3
import json

# Read the config
with open('C:/Users/Fred/AppData/Local/Temp/ca.json', 'r') as f:
    config = json.load(f)

# Add ACME provisioner
acme_provisioner = {
    "type": "ACME",
    "name": "acme",
    "forceCN": True,
    "claims": {
        "maxTLSCertDuration": "8760h",
        "defaultTLSCertDuration": "8760h"
    }
}

# Add to provisioners list
config['authority']['provisioners'].append(acme_provisioner)

# Write updated config
with open('C:/Users/Fred/AppData/Local/Temp/ca.json', 'w') as f:
    json.dump(config, f, indent=4)

print("ACME provisioner added successfully")
