Skip to content

New-VlaamsCertificaat

SYNOPSIS

Generate a new certificate for Stad Gent or District09.

SYNTAX

New-VlaamsCertificaat

DESCRIPTION

The `New-VlaamsCertificaat` function generates a new certificate for Stad Gent or District09. It creates a private key, generates a certificate signing request (CSR), and merges the private key and public certificates into a password-protected PFX file. The function retrieves or creates passwords in PasswordState and supports user interaction for folder selection and certificate type.

EXAMPLES

EXAMPLE 1

New-VlaamsCertificaat

Generates a new certificate for Stad Gent or District09 based on user input and stores it in the selected folder.

EXAMPLE 2

New-VlaamsCertificaat -CN "example.gent.be"

Generates a new certificate with the Common Name "example.gent.be" and stores it in the selected folder.

PARAMETERS

INPUTS

OUTPUTS

NOTES

Requirements Subject is /C=BE/ST=Oost-Vlaanderen/L=Gent/O=BELLK0207451227/OU=Stad Gent/E=certificaat.beheer@gent.be/CN= 'the CN' or /C=BE/ST=Oost-Vlaanderen/L=Gent/O=BELLK0749998654/OU=District09/E=certificaat.beheer@gent.be/CN= 'the CN' change in code if needed.

all files in the same folder (1 off each) share the same base name without the extention for instance (except for public key) gent.be-agiv-services.pem (encrypted private key) gent.be-agiv-services.pfx (keychain with public, private and issuing and root certificate) gent.be-agiv-services.crt (public key) => Will accept any file

The root cert is read from Z:\Security\Certificaten_Vlaamse\Root\2021-20xx\

Password for the encrypted pricvate key and the keystore (PFX) are the same.

Made by: Tristan van Wesemael Created: 12/05/2021 Modified: 20/09/2021