node-red-contrib-trustpoint
Version:
Node-RED nodes for EST (Enrollment over Secure Transport) and certificate operations.
40 lines (37 loc) • 1.5 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('trustpoint-prepare-keystore', {
category: 'Trustpoint',
color: '#3e91f7',
defaults: {
name: { value: "" }
},
inputs: 1,
outputs: 1,
icon: "file.png",
label: function () {
return this.name || "trustpoint-prepare-keystore";
}
});
</script>
<script type="text/x-red" data-template-name="trustpoint-prepare-keystore">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<p>
Prepares the generated private key by sanitizing the device name and building the file path.
<br>Also adds `msg.privateKeyObject` and converts the key to PEM format in `msg.payload`.
</p>
</script>
<script type="text/x-red" data-help-name="trustpoint-prepare-keystore">
<p>
This node prepares the storage of the private key:
<ul>
<li>Sanitizes <code>msg.deviceId</code> to create a safe filename.</li>
<li>Adds <code>msg.filePath</code> with the full path to the .pem file.</li>
<li>Stores the key object in <code>msg.privateKeyObject</code>.</li>
<li>Places the PEM key into <code>msg.payload</code>.</li>
</ul>
It expects <code>msg.deviceId</code> and <code>msg.payload.privateKey</code> to be present.
</p>
</script>