Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
0f04f342
Commit
0f04f342
authored
Jan 31, 2001
by
Niels Möller
Browse files
(main_argp_parser): Support RSA keys for publickey
userauth. Rev: src/lshd.c:1.109
parent
bfe3e66e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lshd.c
View file @
0f04f342
...
...
@@ -385,11 +385,11 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
break
;
case
ARGP_KEY_END
:
{
struct
user_db
*
db
=
NULL
;
struct
user_db
*
user_
db
=
NULL
;
if
(
self
->
with_password
||
self
->
with_publickey
||
self
->
with_srp_keyexchange
)
db
=
make_unix_user_db
(
self
->
backend
,
self
->
reaper
,
self
->
pw_helper
,
self
->
allow_root
);
user_
db
=
make_unix_user_db
(
self
->
backend
,
self
->
reaper
,
self
->
pw_helper
,
self
->
allow_root
);
if
(
self
->
with_dh_keyexchange
||
self
->
with_srp_keyexchange
)
{
...
...
@@ -408,11 +408,12 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
#if WITH_SRP
if
(
self
->
with_srp_keyexchange
)
{
assert
(
db
);
assert
(
user_
db
);
LIST
(
self
->
kex_algorithms
)[
i
++
]
=
ATOM_SRP_RING1_SHA1_LOCAL
;
ALIST_SET
(
self
->
super
.
algorithms
,
ATOM_SRP_RING1_SHA1_LOCAL
,
&
make_srp_server
(
make_srp1
(
&
self
->
random
->
super
),
db
)
&
make_srp_server
(
make_srp1
(
&
self
->
random
->
super
),
user_db
)
->
super
);
}
#endif
/* WITH_SRP */
...
...
@@ -446,20 +447,23 @@ main_argp_parser(int key, char *arg, struct argp_state *state)
LIST
(
self
->
userauth_methods
)[
i
++
]
=
ATOM_PASSWORD
;
ALIST_SET
(
self
->
userauth_algorithms
,
ATOM_PASSWORD
,
&
make_userauth_password
(
db
)
->
super
);
&
make_userauth_password
(
user_
db
)
->
super
);
}
if
(
self
->
with_publickey
)
{
/* Doesn't use spki */
/* FIXME: Doesn't use spki */
struct
lookup_verifier
*
key_db
=
make_authorization_db
(
ssh_format
(
"authorized_keys_sha1"
),
&
sha1_algorithm
);
LIST
(
self
->
userauth_methods
)[
i
++
]
=
ATOM_PUBLICKEY
;
ALIST_SET
(
self
->
userauth_algorithms
,
ATOM_PUBLICKEY
,
&
make_userauth_publickey
(
db
,
make_alist
(
1
,
ATOM_SSH_DSS
,
make_authorization_db
(
ssh_format
(
"authorized_keys_sha1"
),
&
sha1_algorithm
),
(
user_db
,
make_alist
(
2
,
ATOM_SSH_DSS
,
key_db
,
ATOM_SSH_RSA
,
key_db
,
-
1
))
->
super
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment