证书更新
进入工具安装路径下,并执行证书更新命令,执行后需要输入远端服务器的密码。
./tools/haf-tool cert --server <ca_server_ip> --path <ca_server_path> --user <ca_server_user> --update
证书更新操作会将业务证书、CA根证书,同步更新到本地。为使其生效,主机节点和卸载节点库安装需重新启动上层应用,卸载节点服务化安装需重新启动业务进程。
此处以卸载节点服务化安装为例,主机节点和卸载节点库安装可参考卸载节点服务化安装执行。
- 通过SmartKit更新生成服务端或客户端节点的证书。其对应的执行命令为:
参数
内容
任务名称
更新节点证书
任务描述
从CA节点更新当前节点证书
运行目录
/home/omm/haf-install/haf-target
执行命令
echo password | ./tools/haf-tool cert --server ca_server_ip --path ca_server_path --user ca_server_user --update
是否预判返回码
是
期望返回码
0
- 重启业务进程完成更新。
证书更新的内部脚本crt_update.sh,该脚本在安装目录下的“haf-tool/scripts”路径下,由haf_tool工具调用,内部调用的命令为:
cd tools/scripts
./crt_update.sh -i <ip_addr> -p <remote_path> -u <user_name> -t <cert_path>
命令执行后需要手动输入远端服务器的登录密码。
选项 |
内容 |
必选 |
---|---|---|
-i <ip_addr> |
CA节点所在服务器的IP地址,由用户输入,并通过haf_tool工具传入。 |
√ |
-p <remote_path> |
CA节点证书存放路径,由用户输入,并通过haf_tool工具传入。 |
√ |
-u <user_name> |
CA节点所在服务器的用户名,由用户输入,并通过haf_tool工具传入。 |
√ |
-t <cert_path> |
证书存放路径,haf-tool调用时使用配置文件中的cert_path路径。 |
√ |

crt_update.sh为软件内部工具,不建议用户单独调用。