version 1.56, 2002/06/10 16:53:06 |
version 1.56.4.2, 2004/03/04 18:18:15 |
|
|
secure_filename(f, file, pw, line, sizeof(line)) != 0) { |
secure_filename(f, file, pw, line, sizeof(line)) != 0) { |
xfree(file); |
xfree(file); |
fclose(f); |
fclose(f); |
log("Authentication refused: %s", line); |
logit("Authentication refused: %s", line); |
restore_uid(); |
restore_uid(); |
return (0); |
return (0); |
} |
} |
|
|
|
|
/* check the real bits */ |
/* check the real bits */ |
if (bits != BN_num_bits(key->rsa->n)) |
if (bits != BN_num_bits(key->rsa->n)) |
log("Warning: %s, line %lu: keysize mismatch: " |
logit("Warning: %s, line %lu: keysize mismatch: " |
"actual %d vs. announced %d.", |
"actual %d vs. announced %d.", |
file, linenum, BN_num_bits(key->rsa->n), bits); |
file, linenum, BN_num_bits(key->rsa->n), bits); |
|
|
|
|
* successful. This may exit if there is a serious protocol violation. |
* successful. This may exit if there is a serious protocol violation. |
*/ |
*/ |
int |
int |
auth_rsa(struct passwd *pw, BIGNUM *client_n) |
auth_rsa(Authctxt *authctxt, BIGNUM *client_n) |
{ |
{ |
Key *key; |
Key *key; |
char *fp; |
char *fp; |
|
struct passwd *pw = authctxt->pw; |
|
|
/* no user given */ |
/* no user given */ |
if (pw == NULL) |
if (!authctxt->valid) |
return 0; |
return 0; |
|
|
if (!PRIVSEP(auth_rsa_key_allowed(pw, client_n, &key))) { |
if (!PRIVSEP(auth_rsa_key_allowed(pw, client_n, &key))) { |