comparison svr-authpubkey.c @ 1654:cc0fc5131c5c

Rename EPKA -> Plugin
author Matt Johnston <matt@ucc.asn.au>
date Wed, 15 May 2019 21:59:45 +0800
parents 76189c9ffea2
children ba6fc7afe1c5
comparison
equal deleted inserted replaced
1653:76189c9ffea2 1654:cc0fc5131c5c
109 Avoids blind user enumeration though it isn't possible to prevent 109 Avoids blind user enumeration though it isn't possible to prevent
110 testing for user existence if the public key is known */ 110 testing for user existence if the public key is known */
111 send_msg_userauth_failure(0, 0); 111 send_msg_userauth_failure(0, 0);
112 goto out; 112 goto out;
113 } 113 }
114 #if DROPBEAR_EPKA 114 #if DROPBEAR_PLUGIN
115 if (svr_ses.epka_instance != NULL) { 115 if (svr_ses.plugin_instance != NULL) {
116 char *options_buf; 116 char *options_buf;
117 if (svr_ses.epka_instance->checkpubkey( 117 if (svr_ses.plugin_instance->checkpubkey(
118 svr_ses.epka_instance, 118 svr_ses.plugin_instance,
119 &ses.epka_session, 119 &ses.plugin_session,
120 algo, 120 algo,
121 algolen, 121 algolen,
122 keyblob, 122 keyblob,
123 keybloblen, 123 keybloblen,
124 ses.authstate.username) == DROPBEAR_SUCCESS) { 124 ses.authstate.username) == DROPBEAR_SUCCESS) {
125 /* Success */ 125 /* Success */
126 auth_failure = 0; 126 auth_failure = 0;
127 127
128 /* Options provided? */ 128 /* Options provided? */
129 options_buf = ses.epka_session->get_options(ses.epka_session); 129 options_buf = ses.plugin_session->get_options(ses.plugin_session);
130 if (options_buf) { 130 if (options_buf) {
131 struct buf temp_buf = { 131 struct buf temp_buf = {
132 .data = (unsigned char *)options_buf, 132 .data = (unsigned char *)options_buf,
133 .len = strlen(options_buf), 133 .len = strlen(options_buf),
134 .pos = 0, 134 .pos = 0,
191 if (buf_verify(ses.payload, key, signbuf) == DROPBEAR_SUCCESS) { 191 if (buf_verify(ses.payload, key, signbuf) == DROPBEAR_SUCCESS) {
192 dropbear_log(LOG_NOTICE, 192 dropbear_log(LOG_NOTICE,
193 "Pubkey auth succeeded for '%s' with key %s from %s", 193 "Pubkey auth succeeded for '%s' with key %s from %s",
194 ses.authstate.pw_name, fp, svr_ses.addrstring); 194 ses.authstate.pw_name, fp, svr_ses.addrstring);
195 send_msg_userauth_success(); 195 send_msg_userauth_success();
196 #if DROPBEAR_EPKA 196 #if DROPBEAR_PLUGIN
197 if ((ses.epka_session != NULL) && (svr_ses.epka_instance->auth_success != NULL)) { 197 if ((ses.plugin_session != NULL) && (svr_ses.plugin_instance->auth_success != NULL)) {
198 /* Was authenticated through the external plugin. tell plugin that signature verification was ok */ 198 /* Was authenticated through the external plugin. tell plugin that signature verification was ok */
199 svr_ses.epka_instance->auth_success(ses.epka_session); 199 svr_ses.plugin_instance->auth_success(ses.plugin_session);
200 } 200 }
201 #endif 201 #endif
202 202
203 } else { 203 } else {
204 dropbear_log(LOG_WARNING, 204 dropbear_log(LOG_WARNING,