OSDN Git Service

Map unknown users to shell for Android GCE.
[android-x86/external-openssh.git] / monitor_wrap.c
index 3c3856a..b379f05 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.73 2011/06/17 21:44:31 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.84 2015/02/16 22:13:32 djm Exp $ */
 /*
  * Copyright 2002 Niels Provos <provos@citi.umich.edu>
  * Copyright 2002 Markus Friedl <markus@openbsd.org>
 #include <string.h>
 #include <unistd.h>
 
+#ifdef WITH_OPENSSL
 #include <openssl/bn.h>
 #include <openssl/dh.h>
 #include <openssl/evp.h>
+#endif
 
 #include "openbsd-compat/sys-queue.h"
 #include "xmalloc.h"
 #include "ssh.h"
+#ifdef WITH_OPENSSL
 #include "dh.h"
+#endif
 #include "buffer.h"
 #include "key.h"
 #include "cipher.h"
@@ -71,8 +75,6 @@
 #include "atomicio.h"
 #include "monitor_fdpass.h"
 #include "misc.h"
-#include "schnorr.h"
-#include "jpake.h"
 #include "uuencode.h"
 
 #include "channels.h"
@@ -80,6 +82,8 @@
 #include "servconf.h"
 #include "roaming.h"
 
+#include "ssherr.h"
+
 /* Imports */
 extern int compat20;
 extern z_stream incoming_stream;
@@ -149,8 +153,10 @@ mm_request_receive(int sock, Buffer *m)
        debug3("%s entering", __func__);
 
        if (atomicio(read, sock, buf, sizeof(buf)) != sizeof(buf)) {
-               if (errno == EPIPE)
+               if (errno == EPIPE) {
+                       error("%s: socket closed", __func__);
                        cleanup_exit(255);
+               }
                fatal("%s: read: %s", __func__, strerror(errno));
        }
        msg_len = get_u32(buf);
@@ -176,6 +182,7 @@ mm_request_receive_expect(int sock, enum monitor_reqtype type, Buffer *m)
                    rtype, type);
 }
 
+#ifdef WITH_OPENSSL
 DH *
 mm_choose_dh(int min, int nbits, int max)
 {
@@ -209,17 +216,19 @@ mm_choose_dh(int min, int nbits, int max)
 
        return (dh_new_group(g, p));
 }
+#endif
 
 int
-mm_key_sign(Key *key, u_char **sigp, u_int *lenp, u_char *data, u_int datalen)
+mm_key_sign(Key *key, u_char **sigp, u_int *lenp,
+    const u_char *data, u_int datalen)
 {
-       Kex *kex = *pmonitor->m_pkex;
+       struct kex *kex = *pmonitor->m_pkex;
        Buffer m;
 
        debug3("%s entering", __func__);
 
        buffer_init(&m);
-       buffer_put_int(&m, kex->host_key_index(key));
+       buffer_put_int(&m, kex->host_key_index(key, 0, active_state));
        buffer_put_string(&m, data, datalen);
 
        mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SIGN, &m);
@@ -259,10 +268,10 @@ mm_getpwnamallow(const char *username)
                fatal("%s: struct passwd size mismatch", __func__);
        pw->pw_name = buffer_get_string(&m, NULL);
        pw->pw_passwd = buffer_get_string(&m, NULL);
-#ifdef HAVE_PW_GECOS_IN_PASSWD
+#ifdef HAVE_STRUCT_PASSWD_PW_GECOS
        pw->pw_gecos = buffer_get_string(&m, NULL);
 #endif
-#ifdef HAVE_PW_CLASS_IN_PASSWD
+#ifdef HAVE_STRUCT_PASSWD_PW_CLASS
        pw->pw_class = buffer_get_string(&m, NULL);
 #endif
        pw->pw_dir = buffer_get_string(&m, NULL);
@@ -288,7 +297,7 @@ out:
 #undef M_CP_STRARRAYOPT
 
        copy_set_server_options(&options, newopts, 1);
-       xfree(newopts);
+       free(newopts);
 
        buffer_free(&m);
 
@@ -314,7 +323,7 @@ mm_auth2_read_banner(void)
 
        /* treat empty banner as missing banner */
        if (strlen(banner) == 0) {
-               xfree(banner);
+               free(banner);
                banner = NULL;
        }
        return (banner);
@@ -407,7 +416,7 @@ mm_key_allowed(enum mm_keytype type, char *user, char *host, Key *key)
        buffer_put_cstring(&m, user ? user : "");
        buffer_put_cstring(&m, host ? host : "");
        buffer_put_string(&m, blob, len);
-       xfree(blob);
+       free(blob);
 
        mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KEYALLOWED, &m);
 
@@ -450,7 +459,7 @@ mm_key_verify(Key *key, u_char *sig, u_int siglen, u_char *data, u_int datalen)
        buffer_put_string(&m, blob, len);
        buffer_put_string(&m, sig, siglen);
        buffer_put_string(&m, data, datalen);
-       xfree(blob);
+       free(blob);
 
        mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_KEYVERIFY, &m);
 
@@ -464,238 +473,21 @@ mm_key_verify(Key *key, u_char *sig, u_int siglen, u_char *data, u_int datalen)
        return (verified);
 }
 
-/* Export key state after authentication */
-Newkeys *
-mm_newkeys_from_blob(u_char *blob, int blen)
-{
-       Buffer b;
-       u_int len;
-       Newkeys *newkey = NULL;
-       Enc *enc;
-       Mac *mac;
-       Comp *comp;
-
-       debug3("%s: %p(%d)", __func__, blob, blen);
-#ifdef DEBUG_PK
-       dump_base64(stderr, blob, blen);
-#endif
-       buffer_init(&b);
-       buffer_append(&b, blob, blen);
-
-       newkey = xmalloc(sizeof(*newkey));
-       enc = &newkey->enc;
-       mac = &newkey->mac;
-       comp = &newkey->comp;
-
-       /* Enc structure */
-       enc->name = buffer_get_string(&b, NULL);
-       buffer_get(&b, &enc->cipher, sizeof(enc->cipher));
-       enc->enabled = buffer_get_int(&b);
-       enc->block_size = buffer_get_int(&b);
-       enc->key = buffer_get_string(&b, &enc->key_len);
-       enc->iv = buffer_get_string(&b, &len);
-       if (len != enc->block_size)
-               fatal("%s: bad ivlen: expected %u != %u", __func__,
-                   enc->block_size, len);
-
-       if (enc->name == NULL || cipher_by_name(enc->name) != enc->cipher)
-               fatal("%s: bad cipher name %s or pointer %p", __func__,
-                   enc->name, enc->cipher);
-
-       /* Mac structure */
-       mac->name = buffer_get_string(&b, NULL);
-       if (mac->name == NULL || mac_setup(mac, mac->name) == -1)
-               fatal("%s: can not setup mac %s", __func__, mac->name);
-       mac->enabled = buffer_get_int(&b);
-       mac->key = buffer_get_string(&b, &len);
-       if (len > mac->key_len)
-               fatal("%s: bad mac key length: %u > %d", __func__, len,
-                   mac->key_len);
-       mac->key_len = len;
-
-       /* Comp structure */
-       comp->type = buffer_get_int(&b);
-       comp->enabled = buffer_get_int(&b);
-       comp->name = buffer_get_string(&b, NULL);
-
-       len = buffer_len(&b);
-       if (len != 0)
-               error("newkeys_from_blob: remaining bytes in blob %u", len);
-       buffer_free(&b);
-       return (newkey);
-}
-
-int
-mm_newkeys_to_blob(int mode, u_char **blobp, u_int *lenp)
-{
-       Buffer b;
-       int len;
-       Enc *enc;
-       Mac *mac;
-       Comp *comp;
-       Newkeys *newkey = (Newkeys *)packet_get_newkeys(mode);
-
-       debug3("%s: converting %p", __func__, newkey);
-
-       if (newkey == NULL) {
-               error("%s: newkey == NULL", __func__);
-               return 0;
-       }
-       enc = &newkey->enc;
-       mac = &newkey->mac;
-       comp = &newkey->comp;
-
-       buffer_init(&b);
-       /* Enc structure */
-       buffer_put_cstring(&b, enc->name);
-       /* The cipher struct is constant and shared, you export pointer */
-       buffer_append(&b, &enc->cipher, sizeof(enc->cipher));
-       buffer_put_int(&b, enc->enabled);
-       buffer_put_int(&b, enc->block_size);
-       buffer_put_string(&b, enc->key, enc->key_len);
-       packet_get_keyiv(mode, enc->iv, enc->block_size);
-       buffer_put_string(&b, enc->iv, enc->block_size);
-
-       /* Mac structure */
-       buffer_put_cstring(&b, mac->name);
-       buffer_put_int(&b, mac->enabled);
-       buffer_put_string(&b, mac->key, mac->key_len);
-
-       /* Comp structure */
-       buffer_put_int(&b, comp->type);
-       buffer_put_int(&b, comp->enabled);
-       buffer_put_cstring(&b, comp->name);
-
-       len = buffer_len(&b);
-       if (lenp != NULL)
-               *lenp = len;
-       if (blobp != NULL) {
-               *blobp = xmalloc(len);
-               memcpy(*blobp, buffer_ptr(&b), len);
-       }
-       memset(buffer_ptr(&b), 0, len);
-       buffer_free(&b);
-       return len;
-}
-
-static void
-mm_send_kex(Buffer *m, Kex *kex)
-{
-       buffer_put_string(m, kex->session_id, kex->session_id_len);
-       buffer_put_int(m, kex->we_need);
-       buffer_put_int(m, kex->hostkey_type);
-       buffer_put_int(m, kex->kex_type);
-       buffer_put_string(m, buffer_ptr(&kex->my), buffer_len(&kex->my));
-       buffer_put_string(m, buffer_ptr(&kex->peer), buffer_len(&kex->peer));
-       buffer_put_int(m, kex->flags);
-       buffer_put_cstring(m, kex->client_version_string);
-       buffer_put_cstring(m, kex->server_version_string);
-}
-
 void
 mm_send_keystate(struct monitor *monitor)
 {
-       Buffer m, *input, *output;
-       u_char *blob, *p;
-       u_int bloblen, plen;
-       u_int32_t seqnr, packets;
-       u_int64_t blocks, bytes;
-
-       buffer_init(&m);
-
-       if (!compat20) {
-               u_char iv[24];
-               u_char *key;
-               u_int ivlen, keylen;
-
-               buffer_put_int(&m, packet_get_protocol_flags());
-
-               buffer_put_int(&m, packet_get_ssh1_cipher());
-
-               debug3("%s: Sending ssh1 KEY+IV", __func__);
-               keylen = packet_get_encryption_key(NULL);
-               key = xmalloc(keylen+1);        /* add 1 if keylen == 0 */
-               keylen = packet_get_encryption_key(key);
-               buffer_put_string(&m, key, keylen);
-               memset(key, 0, keylen);
-               xfree(key);
-
-               ivlen = packet_get_keyiv_len(MODE_OUT);
-               packet_get_keyiv(MODE_OUT, iv, ivlen);
-               buffer_put_string(&m, iv, ivlen);
-               ivlen = packet_get_keyiv_len(MODE_OUT);
-               packet_get_keyiv(MODE_IN, iv, ivlen);
-               buffer_put_string(&m, iv, ivlen);
-               goto skip;
-       } else {
-               /* Kex for rekeying */
-               mm_send_kex(&m, *monitor->m_pkex);
-       }
-
-       debug3("%s: Sending new keys: %p %p",
-           __func__, packet_get_newkeys(MODE_OUT),
-           packet_get_newkeys(MODE_IN));
-
-       /* Keys from Kex */
-       if (!mm_newkeys_to_blob(MODE_OUT, &blob, &bloblen))
-               fatal("%s: conversion of newkeys failed", __func__);
-
-       buffer_put_string(&m, blob, bloblen);
-       xfree(blob);
-
-       if (!mm_newkeys_to_blob(MODE_IN, &blob, &bloblen))
-               fatal("%s: conversion of newkeys failed", __func__);
-
-       buffer_put_string(&m, blob, bloblen);
-       xfree(blob);
-
-       packet_get_state(MODE_OUT, &seqnr, &blocks, &packets, &bytes);
-       buffer_put_int(&m, seqnr);
-       buffer_put_int64(&m, blocks);
-       buffer_put_int(&m, packets);
-       buffer_put_int64(&m, bytes);
-       packet_get_state(MODE_IN, &seqnr, &blocks, &packets, &bytes);
-       buffer_put_int(&m, seqnr);
-       buffer_put_int64(&m, blocks);
-       buffer_put_int(&m, packets);
-       buffer_put_int64(&m, bytes);
-
-       debug3("%s: New keys have been sent", __func__);
- skip:
-       /* More key context */
-       plen = packet_get_keycontext(MODE_OUT, NULL);
-       p = xmalloc(plen+1);
-       packet_get_keycontext(MODE_OUT, p);
-       buffer_put_string(&m, p, plen);
-       xfree(p);
-
-       plen = packet_get_keycontext(MODE_IN, NULL);
-       p = xmalloc(plen+1);
-       packet_get_keycontext(MODE_IN, p);
-       buffer_put_string(&m, p, plen);
-       xfree(p);
-
-       /* Compression state */
-       debug3("%s: Sending compression state", __func__);
-       buffer_put_string(&m, &outgoing_stream, sizeof(outgoing_stream));
-       buffer_put_string(&m, &incoming_stream, sizeof(incoming_stream));
-
-       /* Network I/O buffers */
-       input = (Buffer *)packet_get_input();
-       output = (Buffer *)packet_get_output();
-       buffer_put_string(&m, buffer_ptr(input), buffer_len(input));
-       buffer_put_string(&m, buffer_ptr(output), buffer_len(output));
-
-       /* Roaming */
-       if (compat20) {
-               buffer_put_int64(&m, get_sent_bytes());
-               buffer_put_int64(&m, get_recv_bytes());
-       }
-
-       mm_request_send(monitor->m_recvfd, MONITOR_REQ_KEYEXPORT, &m);
+       struct ssh *ssh = active_state;         /* XXX */
+       struct sshbuf *m;
+       int r;
+
+       if ((m = sshbuf_new()) == NULL)
+               fatal("%s: sshbuf_new failed", __func__);
+       if ((r = ssh_packet_get_state(ssh, m)) != 0)
+               fatal("%s: get_state failed: %s",
+                   __func__, ssh_err(r));
+       mm_request_send(monitor->m_recvfd, MONITOR_REQ_KEYEXPORT, m);
        debug3("%s: Finished sending state", __func__);
-
-       buffer_free(&m);
+       sshbuf_free(m);
 }
 
 int
@@ -735,10 +527,10 @@ mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
        buffer_free(&m);
 
        strlcpy(namebuf, p, namebuflen); /* Possible truncation */
-       xfree(p);
+       free(p);
 
        buffer_append(&loginmsg, msg, strlen(msg));
-       xfree(msg);
+       free(msg);
 
        if ((*ptyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1 ||
            (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1)
@@ -804,7 +596,7 @@ mm_do_pam_account(void)
        ret = buffer_get_int(&m);
        msg = buffer_get_string(&m, NULL);
        buffer_append(&loginmsg, msg, strlen(msg));
-       xfree(msg);
+       free(msg);
 
        buffer_free(&m);
 
@@ -913,6 +705,7 @@ mm_terminate(void)
        buffer_free(&m);
 }
 
+#ifdef WITH_SSH1
 int
 mm_ssh1_session_key(BIGNUM *num)
 {
@@ -932,6 +725,7 @@ mm_ssh1_session_key(BIGNUM *num)
 
        return (rsafail);
 }
+#endif
 
 static void
 mm_chall_setup(char **name, char **infotxt, u_int *numprompts,
@@ -1034,7 +828,7 @@ mm_skey_query(void *ctx, char **name, char **infotxt,
        mm_chall_setup(name, infotxt, numprompts, prompts, echo_on);
 
        xasprintf(*prompts, "%s%s", challenge, SKEY_PROMPT);
-       xfree(challenge);
+       free(challenge);
 
        return (0);
 }
@@ -1079,6 +873,7 @@ mm_ssh1_session_id(u_char session_id[16])
        buffer_free(&m);
 }
 
+#ifdef WITH_SSH1
 int
 mm_auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
 {
@@ -1108,7 +903,7 @@ mm_auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
                if ((key = key_from_blob(blob, blen)) == NULL)
                        fatal("%s: key_from_blob failed", __func__);
                *rkey = key;
-               xfree(blob);
+               free(blob);
        }
        buffer_free(&m);
 
@@ -1135,7 +930,7 @@ mm_auth_rsa_generate_challenge(Key *key)
 
        buffer_init(&m);
        buffer_put_string(&m, blob, blen);
-       xfree(blob);
+       free(blob);
 
        mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSACHALLENGE, &m);
        mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSACHALLENGE, &m);
@@ -1164,7 +959,7 @@ mm_auth_rsa_verify_response(Key *key, BIGNUM *p, u_char response[16])
        buffer_init(&m);
        buffer_put_string(&m, blob, blen);
        buffer_put_string(&m, response, 16);
-       xfree(blob);
+       free(blob);
 
        mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_RSARESPONSE, &m);
        mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_RSARESPONSE, &m);
@@ -1174,6 +969,7 @@ mm_auth_rsa_verify_response(Key *key, BIGNUM *p, u_char response[16])
 
        return (success);
 }
+#endif
 
 #ifdef SSH_AUDIT_EVENTS
 void
@@ -1291,164 +1087,3 @@ mm_ssh_gssapi_userok(char *user)
 }
 #endif /* GSSAPI */
 
-#ifdef JPAKE
-void
-mm_auth2_jpake_get_pwdata(Authctxt *authctxt, BIGNUM **s,
-    char **hash_scheme, char **salt)
-{
-       Buffer m;
-
-       debug3("%s entering", __func__);
-
-       buffer_init(&m);
-       mm_request_send(pmonitor->m_recvfd,
-           MONITOR_REQ_JPAKE_GET_PWDATA, &m);
-
-       debug3("%s: waiting for MONITOR_ANS_JPAKE_GET_PWDATA", __func__);
-       mm_request_receive_expect(pmonitor->m_recvfd,
-           MONITOR_ANS_JPAKE_GET_PWDATA, &m);
-
-       *hash_scheme = buffer_get_string(&m, NULL);
-       *salt = buffer_get_string(&m, NULL);
-
-       buffer_free(&m);
-}
-
-void
-mm_jpake_step1(struct modp_group *grp,
-    u_char **id, u_int *id_len,
-    BIGNUM **priv1, BIGNUM **priv2, BIGNUM **g_priv1, BIGNUM **g_priv2,
-    u_char **priv1_proof, u_int *priv1_proof_len,
-    u_char **priv2_proof, u_int *priv2_proof_len)
-{
-       Buffer m;
-
-       debug3("%s entering", __func__);
-
-       buffer_init(&m);
-       mm_request_send(pmonitor->m_recvfd,
-           MONITOR_REQ_JPAKE_STEP1, &m);
-
-       debug3("%s: waiting for MONITOR_ANS_JPAKE_STEP1", __func__);
-       mm_request_receive_expect(pmonitor->m_recvfd,
-           MONITOR_ANS_JPAKE_STEP1, &m);
-
-       if ((*priv1 = BN_new()) == NULL ||
-           (*priv2 = BN_new()) == NULL ||
-           (*g_priv1 = BN_new()) == NULL ||
-           (*g_priv2 = BN_new()) == NULL)
-               fatal("%s: BN_new", __func__);
-
-       *id = buffer_get_string(&m, id_len);
-       /* priv1 and priv2 are, well, private */
-       buffer_get_bignum2(&m, *g_priv1);
-       buffer_get_bignum2(&m, *g_priv2);
-       *priv1_proof = buffer_get_string(&m, priv1_proof_len);
-       *priv2_proof = buffer_get_string(&m, priv2_proof_len);
-
-       buffer_free(&m);
-}
-
-void
-mm_jpake_step2(struct modp_group *grp, BIGNUM *s,
-    BIGNUM *mypub1, BIGNUM *theirpub1, BIGNUM *theirpub2, BIGNUM *mypriv2,
-    const u_char *theirid, u_int theirid_len,
-    const u_char *myid, u_int myid_len,
-    const u_char *theirpub1_proof, u_int theirpub1_proof_len,
-    const u_char *theirpub2_proof, u_int theirpub2_proof_len,
-    BIGNUM **newpub,
-    u_char **newpub_exponent_proof, u_int *newpub_exponent_proof_len)
-{
-       Buffer m;
-
-       debug3("%s entering", __func__);
-
-       buffer_init(&m);
-       /* monitor already has all bignums except theirpub1, theirpub2 */
-       buffer_put_bignum2(&m, theirpub1);
-       buffer_put_bignum2(&m, theirpub2);
-       /* monitor already knows our id */
-       buffer_put_string(&m, theirid, theirid_len);
-       buffer_put_string(&m, theirpub1_proof, theirpub1_proof_len);
-       buffer_put_string(&m, theirpub2_proof, theirpub2_proof_len);
-
-       mm_request_send(pmonitor->m_recvfd,
-           MONITOR_REQ_JPAKE_STEP2, &m);
-
-       debug3("%s: waiting for MONITOR_ANS_JPAKE_STEP2", __func__);
-       mm_request_receive_expect(pmonitor->m_recvfd,
-           MONITOR_ANS_JPAKE_STEP2, &m);
-
-       if ((*newpub = BN_new()) == NULL)
-               fatal("%s: BN_new", __func__);
-
-       buffer_get_bignum2(&m, *newpub);
-       *newpub_exponent_proof = buffer_get_string(&m,
-           newpub_exponent_proof_len);
-
-       buffer_free(&m);
-}
-
-void
-mm_jpake_key_confirm(struct modp_group *grp, BIGNUM *s, BIGNUM *step2_val,
-    BIGNUM *mypriv2, BIGNUM *mypub1, BIGNUM *mypub2,
-    BIGNUM *theirpub1, BIGNUM *theirpub2,
-    const u_char *my_id, u_int my_id_len,
-    const u_char *their_id, u_int their_id_len,
-    const u_char *sess_id, u_int sess_id_len,
-    const u_char *theirpriv2_s_proof, u_int theirpriv2_s_proof_len,
-    BIGNUM **k,
-    u_char **confirm_hash, u_int *confirm_hash_len)
-{
-       Buffer m;
-
-       debug3("%s entering", __func__);
-
-       buffer_init(&m);
-       /* monitor already has all bignums except step2_val */
-       buffer_put_bignum2(&m, step2_val);
-       /* monitor already knows all the ids */
-       buffer_put_string(&m, theirpriv2_s_proof, theirpriv2_s_proof_len);
-
-       mm_request_send(pmonitor->m_recvfd,
-           MONITOR_REQ_JPAKE_KEY_CONFIRM, &m);
-
-       debug3("%s: waiting for MONITOR_ANS_JPAKE_KEY_CONFIRM", __func__);
-       mm_request_receive_expect(pmonitor->m_recvfd,
-           MONITOR_ANS_JPAKE_KEY_CONFIRM, &m);
-
-       /* 'k' is sensitive and stays in the monitor */
-       *confirm_hash = buffer_get_string(&m, confirm_hash_len);
-
-       buffer_free(&m);
-}
-
-int
-mm_jpake_check_confirm(const BIGNUM *k,
-    const u_char *peer_id, u_int peer_id_len,
-    const u_char *sess_id, u_int sess_id_len,
-    const u_char *peer_confirm_hash, u_int peer_confirm_hash_len)
-{
-       Buffer m;
-       int success = 0;
-
-       debug3("%s entering", __func__);
-
-       buffer_init(&m);
-       /* k is dummy in slave, ignored */
-       /* monitor knows all the ids */
-       buffer_put_string(&m, peer_confirm_hash, peer_confirm_hash_len);
-       mm_request_send(pmonitor->m_recvfd,
-           MONITOR_REQ_JPAKE_CHECK_CONFIRM, &m);
-
-       debug3("%s: waiting for MONITOR_ANS_JPAKE_CHECK_CONFIRM", __func__);
-       mm_request_receive_expect(pmonitor->m_recvfd,
-           MONITOR_ANS_JPAKE_CHECK_CONFIRM, &m);
-
-       success = buffer_get_int(&m);
-       buffer_free(&m);
-
-       debug3("%s: success = %d", __func__, success);
-       return success;
-}
-#endif /* JPAKE */