A method for enabling a secure communication with a target device over a network , the method comprising: opening an unsecured Open Platform Communications Foundation Unified Architecture, OPC UA, Endpoint by an OPC UA Server that runs on the target device, the unsecured OPC UA Endpoint providing security context data that is in conformity with an OPC UA information model, wherein the security context data indicates the presence of an initial device certificate stored on the target device; connecting to the OPC UA Server over the network by an OPC UA Client running on a first device , and requesting the initial device certificate; receiving , by the OPC UA Client, the initial device certificate from the OPC UA Server by unsecured communication over the network; validating , by the first device, the initial device certificate against a root certificate or intermediate certificate of the issuer of the initial device certificate; establishing , by the first device, a device certificate; encrypting , by the first device, at least the device certificate using an initial device public key of the initial device certificate to produce encrypted data; sending the encrypted data from the OPC UA Client to the OPC UA Server over the network; decrypting , by the target device, the encrypted data using an initial device private key associated with the initial device certificate to obtain at least the device certificate; storing the device certificate on the target device; and opening a secured OPC UA Endpoint by the OPC UA Server, the secured OPC UA Endpoint providing access to technical functions of the target device via secure communication over the network based on the device certificate. opening an unsecured Open Platform Communications Foundation Unified Architecture, OPC UA, Endpoint by an OPC UA Server that runs on the target device, the unsecured OPC UA Endpoint providing security context data that is in conformity with an OPC UA information model, wherein the security context data indicates the presence of an initial device certificate stored on the target device; connecting to the OPC UA Server over the network by an OPC UA Client running on a first device , and requesting the initial device certificate; receiving , by the OPC UA Client, the initial device certificate from the OPC UA Server by unsecured communication over the network; validating , by the first device, the initial device certificate against a root certificate or intermediate certificate of the issuer of the initial device certificate; establishing , by the first device, a device certificate; encrypting , by the first device, at least the device certificate using an initial device public key of the initial device certificate to produce encrypted data; sending the encrypted data from the OPC UA Client to the OPC UA Server over the network; decrypting , by the target device, the encrypted data using an initial device private key associated with the initial device certificate to obtain at least the device certificate; storing the device certificate on the target device; and opening a secured OPC UA Endpoint by the OPC UA Server, the secured OPC UA Endpoint providing access to technical functions of the target device via secure communication over the network based on the device certificate. <EOS>