From 0436487bdbc3b0caaed9bb679fe355dec67ec8ab Mon Sep 17 00:00:00 2001 From: fit2bot <68588906+fit2bot@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:01:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=BF=E6=8D=A2ssh=20key=20=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=AF=86=E9=92=A5=E6=96=B9=E6=B3=95=20(#10995)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: feng <1304903146@qq.com> --- apps/accounts/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/accounts/utils.py b/apps/accounts/utils.py index fc13a62d4..ef0d61fe1 100644 --- a/apps/accounts/utils.py +++ b/apps/accounts/utils.py @@ -4,7 +4,7 @@ from rest_framework import serializers from accounts.const import ( SecretType, DEFAULT_PASSWORD_RULES ) -from common.utils import gen_key_pair, random_string +from common.utils import ssh_key_gen, random_string from common.utils import validate_ssh_private_key, parse_ssh_private_key_str @@ -16,7 +16,7 @@ class SecretGenerator: @staticmethod def generate_ssh_key(): - private_key, public_key = gen_key_pair() + private_key, public_key = ssh_key_gen() return private_key def generate_password(self):