CreateCertificate Method

Creates a new self-signed certificate in the current store.

Object Oriented Interface

public function doCreateCertificate($certsubject, $serialnumber);

Procedural Interface

ipworkssnmp_certmgr_do_createcertificate($res, $certsubject, $serialnumber);


This method creates a new self-signed certificate in the current store, containing the following:

CertSubject specifies the subject of the new certificate. A new keyset (public/private key pair) is generated and associated with the new certificate.

The certificate subject is a comma separated list of distinguished name fields and values. For instance ", OU=test, C=US,". Common fields and their meanings are displayed below.

CNCommon Name. This is commonly a host name like
OUOrganizational Unit
EEmail Address

If a field value contains a comma it must be quoted.

SerialNumber specifies the certificate serial number. All certificates signed by the same issuer must have different (unique) serial numbers.

The time validity of the new certificate is determined by the CertValidityTime configuration setting, and the key size by the CertKeyLength configuration setting.

In the Unix edition of the toolkit the certificate will be created in memory. Call ExportCertificate to export the newly created certificate to a PEM file.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks SNMP 2020 PHP Edition - Version 20.0 [Build 7941]