forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
switch from Key typedef with struct sshkey; ok djm@ Upstream-ID: 3067d33e04efbe5131ce8f70668c47a58e5b7a1f
- Loading branch information
Showing
14 changed files
with
110 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: monitor.c,v 1.167 2017/02/03 23:05:57 djm Exp $ */ | ||
/* $OpenBSD: monitor.c,v 1.168 2017/05/30 08:52:19 markus Exp $ */ | ||
/* | ||
* Copyright 2002 Niels Provos <[email protected]> | ||
* Copyright 2002 Markus Friedl <[email protected]> | ||
|
@@ -1119,7 +1119,7 @@ mm_answer_pam_free_ctx(int sock, Buffer *m) | |
int | ||
mm_answer_keyallowed(int sock, Buffer *m) | ||
{ | ||
Key *key; | ||
struct sshkey *key; | ||
char *cuser, *chost; | ||
u_char *blob; | ||
u_int bloblen, pubkey_auth_attempt; | ||
|
@@ -1332,7 +1332,7 @@ monitor_valid_hostbasedblob(u_char *data, u_int datalen, char *cuser, | |
int | ||
mm_answer_keyverify(int sock, Buffer *m) | ||
{ | ||
Key *key; | ||
struct sshkey *key; | ||
u_char *signature, *data, *blob; | ||
u_int signaturelen, datalen, bloblen; | ||
int verified = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: monitor_wrap.c,v 1.90 2017/05/17 01:24:17 djm Exp $ */ | ||
/* $OpenBSD: monitor_wrap.c,v 1.91 2017/05/30 08:52:19 markus Exp $ */ | ||
/* | ||
* Copyright 2002 Niels Provos <[email protected]> | ||
* Copyright 2002 Markus Friedl <[email protected]> | ||
|
@@ -216,7 +216,7 @@ mm_choose_dh(int min, int nbits, int max) | |
#endif | ||
|
||
int | ||
mm_key_sign(Key *key, u_char **sigp, u_int *lenp, | ||
mm_key_sign(struct sshkey *key, u_char **sigp, u_int *lenp, | ||
const u_char *data, u_int datalen, const char *hostkey_alg) | ||
{ | ||
struct kex *kex = *pmonitor->m_pkex; | ||
|
@@ -375,22 +375,23 @@ mm_auth_password(Authctxt *authctxt, char *password) | |
} | ||
|
||
int | ||
mm_user_key_allowed(struct passwd *pw, Key *key, int pubkey_auth_attempt) | ||
mm_user_key_allowed(struct passwd *pw, struct sshkey *key, | ||
int pubkey_auth_attempt) | ||
{ | ||
return (mm_key_allowed(MM_USERKEY, NULL, NULL, key, | ||
pubkey_auth_attempt)); | ||
} | ||
|
||
int | ||
mm_hostbased_key_allowed(struct passwd *pw, const char *user, const char *host, | ||
Key *key) | ||
struct sshkey *key) | ||
{ | ||
return (mm_key_allowed(MM_HOSTKEY, user, host, key, 0)); | ||
} | ||
|
||
int | ||
mm_key_allowed(enum mm_keytype type, const char *user, const char *host, | ||
Key *key, int pubkey_auth_attempt) | ||
struct sshkey *key, int pubkey_auth_attempt) | ||
{ | ||
Buffer m; | ||
u_char *blob; | ||
|
@@ -435,7 +436,8 @@ mm_key_allowed(enum mm_keytype type, const char *user, const char *host, | |
*/ | ||
|
||
int | ||
mm_key_verify(Key *key, u_char *sig, u_int siglen, u_char *data, u_int datalen) | ||
mm_key_verify(struct sshkey *key, u_char *sig, u_int siglen, u_char *data, | ||
u_int datalen) | ||
{ | ||
Buffer m; | ||
u_char *blob; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: monitor_wrap.h,v 1.32 2016/09/28 16:33:07 djm Exp $ */ | ||
/* $OpenBSD: monitor_wrap.h,v 1.33 2017/05/30 08:52:19 markus Exp $ */ | ||
|
||
/* | ||
* Copyright 2002 Niels Provos <[email protected]> | ||
|
@@ -40,16 +40,18 @@ struct Authctxt; | |
void mm_log_handler(LogLevel, const char *, void *); | ||
int mm_is_monitor(void); | ||
DH *mm_choose_dh(int, int, int); | ||
int mm_key_sign(Key *, u_char **, u_int *, const u_char *, u_int, const char *); | ||
int mm_key_sign(struct sshkey *, u_char **, u_int *, const u_char *, u_int, | ||
const char *); | ||
void mm_inform_authserv(char *, char *); | ||
struct passwd *mm_getpwnamallow(const char *); | ||
char *mm_auth2_read_banner(void); | ||
int mm_auth_password(struct Authctxt *, char *); | ||
int mm_key_allowed(enum mm_keytype, const char *, const char *, Key *, int); | ||
int mm_user_key_allowed(struct passwd *, Key *, int); | ||
int mm_key_allowed(enum mm_keytype, const char *, const char *, struct sshkey *, | ||
int); | ||
int mm_user_key_allowed(struct passwd *, struct sshkey *, int); | ||
int mm_hostbased_key_allowed(struct passwd *, const char *, | ||
const char *, Key *); | ||
int mm_key_verify(Key *, u_char *, u_int, u_char *, u_int); | ||
const char *, struct sshkey *); | ||
int mm_key_verify(struct sshkey *, u_char *, u_int, u_char *, u_int); | ||
|
||
#ifdef GSSAPI | ||
OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: ssh.c,v 1.459 2017/05/02 08:06:33 jmc Exp $ */ | ||
/* $OpenBSD: ssh.c,v 1.460 2017/05/30 08:52:19 markus Exp $ */ | ||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
* Copyright (c) 1995 Tatu Ylonen <[email protected]>, Espoo, Finland | ||
|
@@ -1278,7 +1278,7 @@ main(int ac, char **av) | |
if (options.hostbased_authentication) { | ||
sensitive_data.nkeys = 9; | ||
sensitive_data.keys = xcalloc(sensitive_data.nkeys, | ||
sizeof(Key)); | ||
sizeof(struct sshkey)); /* XXX */ | ||
for (i = 0; i < sensitive_data.nkeys; i++) | ||
sensitive_data.keys[i] = NULL; | ||
|
||
|
@@ -1849,16 +1849,16 @@ load_public_identity_files(void) | |
{ | ||
char *filename, *cp, thishost[NI_MAXHOST]; | ||
char *pwdir = NULL, *pwname = NULL; | ||
Key *public; | ||
struct sshkey *public; | ||
struct passwd *pw; | ||
int i; | ||
u_int n_ids, n_certs; | ||
char *identity_files[SSH_MAX_IDENTITY_FILES]; | ||
Key *identity_keys[SSH_MAX_IDENTITY_FILES]; | ||
struct sshkey *identity_keys[SSH_MAX_IDENTITY_FILES]; | ||
char *certificate_files[SSH_MAX_CERTIFICATE_FILES]; | ||
struct sshkey *certificates[SSH_MAX_CERTIFICATE_FILES]; | ||
#ifdef ENABLE_PKCS11 | ||
Key **keys; | ||
struct sshkey **keys; | ||
int nkeys; | ||
#endif /* PKCS11 */ | ||
|
||
|
Oops, something went wrong.