mirror of
https://github.com/gregtwallace/apc-p15-tool.git
synced 2025-02-02 04:39:25 +00:00
16 lines
425 B
Go
16 lines
425 B
Go
|
package apcssh
|
||
|
|
||
|
import "fmt"
|
||
|
|
||
|
// InstallSSLCert installs the specified p15 cert file on the UPS. This
|
||
|
// function currently only works on NMC2.
|
||
|
func (cli *Client) InstallSSLCert(keyCertP15 []byte) error {
|
||
|
// install NMC2 P15 file
|
||
|
err := cli.UploadSCP("/ssl/defaultcert.p15", keyCertP15, 0600)
|
||
|
if err != nil {
|
||
|
return fmt.Errorf("apcssh: ssl cert install: failed to send file to ups over scp (%w)", err)
|
||
|
}
|
||
|
|
||
|
return nil
|
||
|
}
|