BACnetStack_SCCertificateRemoveIssuer
bool BACnetStack_SCCertificateRemoveIssuer( uint32_t * procedureId, const uint32_t targetNetworkPortInstance, const uint8_t * currentIssuerCertificate, const uint32_t currentIssuerCertificateLength, const uint8_t reinitializedStateOfDevice, const char * password, const uint8_t passwordLength, const uint8_t * connectionString, const uint8_t connectionStringLength, const uint32_t networkPortInstance, const uint16_t destinationNetwork, const uint8_t * destinationAddress, const uint8_t destinationAddressLength, const uint8_t passwordEncoding);Removes an outdated issuer certificate from a BACnet/SC node, as the certificate-management procedure of 135-2024 clause 19.8.3.3 describes.
Finds the issuer file holding currentIssuerCertificate as BACnetStack_SCCertificateAddIssuer() does, writes File_Size = 0 on the OTHER issuer file, then sends ReinitializeDevice. The current issuer is never touched: removing the issuer certificate in use would leave the nodes unable to validate each other’s certificates and so unable to connect (cl. 19.8.3.3). A Failed report at step 6 (ClearCertificateFile) means that File_Size = 0 write, the procedure’s only write, was refused, not sent, or not confirmed; no ReinitializeDevice is sent. When it was not confirmed (a timeout or an Abort) it may have been applied, so the stack first sends WriteProperty Command := DISCARD_CHANGES to the target Network Port, which also discards anything else pending on that port. The progress hook reports the steps in the order 1, 2, 6, 8.
Parameters
Section titled “Parameters”| Parameter | Direction | Description |
|---|---|---|
procedureId |
out | Identifies the procedure in the progress hook and in Cancel. |
targetNetworkPortInstance |
in | The BACnet/SC Network Port object instance in the target device. |
currentIssuerCertificate |
in | The issuer certificate the network uses now, byte for byte as it is stored in the target’s issuer file. That file is kept; the other one is cleared. |
currentIssuerCertificateLength |
in | The number of bytes in currentIssuerCertificate. |
reinitializedStateOfDevice |
in | ACTIVATE_CHANGES (7) or WARMSTART (1) - the final ReinitializeDevice. |
password |
in | The ReinitializeDevice password, as for BACnetStack_SendReinitializeDevice(). May be NULL with passwordLength 0. NULL with a non-zero passwordLength, or a password BACnetStack_SendReinitializeDevice() would refuse, makes the call return false before anything is sent. |
passwordLength |
in | The number of bytes in password. |
connectionString |
in | The target device’s datalink address, as for BACnetStack_SendReinitializeDevice(). |
connectionStringLength |
in | The number of bytes in connectionString. |
networkPortInstance |
in | The local Network Port object instance to send on, or BACNET_NETWORK_PORT_DEFAULT (4194303). |
destinationNetwork |
in | The target’s network number when it is behind a router; 0 for the local network. |
destinationAddress |
in | The target’s address on destinationNetwork; NULL for the local network. |
destinationAddressLength |
in | The number of bytes in destinationAddress. |
passwordEncoding |
in | The character set of password, as for BACnetStack_SendReinitializeDevice(). |
Returns
Section titled “Returns”True when the procedure started (its first request was sent). False when STACK_OPTION_NM_SCCM_A is not compiled, CallbackGetSystemTime is not registered, the current issuer certificate is missing, procedureId is NULL, reinitializedStateOfDevice is neither ACTIVATE_CHANGES (7) nor WARMSTART (1), password is NULL with a non-zero passwordLength or would be refused by BACnetStack_SendReinitializeDevice(), a procedure is already running against this target (the same connectionString, destinationNetwork and destinationAddress - whichever Network Port it names), or the first request could not be sent.
Topic: BACnet/SC. Declared in CASBACnetStackDLL.h.