updates.
[silc.git] / lib / silcclient / protocol.c
index 3d18378e088f9cfdd97f86b21b291f4518181054..bb9c651313c53e0b96d3983b30431bb6fba06b53 100644 (file)
@@ -52,29 +52,57 @@ void silc_client_protocol_ke_send_packet(SilcSKE ske,
                          packet->data, packet->len, TRUE);
 }
 
-/* Callback that is called when we have received KE2 payload from
+/* Public key verification callback. Called by the application. */
+
+typedef struct {
+  SilcSKE ske;
+  SilcSKEVerifyCbCompletion completion;
+  void *completion_context;
+} *VerifyKeyContext;
+
+static void silc_client_verify_key_cb(bool success, void *context)
+{
+  VerifyKeyContext verify = (VerifyKeyContext)context;
+
+  SILC_LOG_DEBUG(("Start"));
+
+  /* Call the completion callback back to the SKE */
+  verify->completion(verify->ske, success ? SILC_SKE_STATUS_OK : 
+                    SILC_SKE_STATUS_UNSUPPORTED_PUBLIC_KEY, 
+                    verify->completion_context);
+
+  silc_free(verify);
+}
+
+/* Callback that is called when we have received KE payload from
    responder. We try to verify the public key now. */
 
-SilcSKEStatus silc_client_protocol_ke_verify_key(SilcSKE ske,
-                                                unsigned char *pk_data,
-                                                uint32 pk_len,
-                                                SilcSKEPKType pk_type,
-                                                void *context)
+void silc_client_protocol_ke_verify_key(SilcSKE ske,
+                                       unsigned char *pk_data,
+                                       uint32 pk_len,
+                                       SilcSKEPKType pk_type,
+                                       void *context,
+                                       SilcSKEVerifyCbCompletion completion,
+                                       void *completion_context)
 {
   SilcProtocol protocol = (SilcProtocol)context;
   SilcClientKEInternalContext *ctx = 
     (SilcClientKEInternalContext *)protocol->context;
   SilcClient client = (SilcClient)ctx->client;
+  VerifyKeyContext verify;
 
   SILC_LOG_DEBUG(("Start"));
 
-  /* Verify public key from user. */
-  if (!client->ops->verify_public_key(client, ctx->sock->user_data, 
-                                     ctx->sock->type,
-                                     pk_data, pk_len, pk_type))
-    return SILC_SKE_STATUS_UNSUPPORTED_PUBLIC_KEY;
+  verify = silc_calloc(1, sizeof(*verify));
+  verify->ske = ske;
+  verify->completion = completion;
+  verify->completion_context = completion_context;
 
-  return SILC_SKE_STATUS_OK;
+  /* Verify public key from user. */
+  client->ops->verify_public_key(client, ctx->sock->user_data, 
+                                ctx->sock->type,
+                                pk_data, pk_len, pk_type,
+                                silc_client_verify_key_cb, verify);
 }
 
 /* Sets the negotiated key material into use for particular connection. */
@@ -145,7 +173,7 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
   SilcClient client = (SilcClient)ske->user_data;
   SilcSKEStatus status = SILC_SKE_STATUS_OK;
   char *cp;
-  int maj = 0, min = 0, build = 0, maj2, min2, build2;
+  int maj = 0, min = 0, build = 0, maj2 = 0, min2 = 0, build2 = 0;
 
   /* Check for initial version string */
   if (!strstr(version, "SILC-1.0-"))
@@ -153,10 +181,10 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
 
   /* Check software version */
 
-  if (len < strlen(silc_version_string))
+  cp = version + 9;
+  if (!cp)
     status = SILC_SKE_STATUS_BAD_VERSION;
 
-  cp = version + 9;
   maj = atoi(cp);
   cp = strchr(cp, '.');
   if (cp) {
@@ -168,6 +196,9 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
     build = atoi(cp + 1);
 
   cp = silc_version_string + 9;
+  if (!cp)
+    status = SILC_SKE_STATUS_BAD_VERSION;
+
   maj2 = atoi(cp);
   cp = strchr(cp, '.');
   if (cp) {
@@ -180,10 +211,8 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
 
   if (maj != maj2)
     status = SILC_SKE_STATUS_BAD_VERSION;
-#if 0
   if (min < min2)
     status = SILC_SKE_STATUS_BAD_VERSION;
-#endif
 
   if (status != SILC_SKE_STATUS_OK)
     client->ops->say(client, conn, 
@@ -192,6 +221,64 @@ SilcSKEStatus silc_ske_check_version(SilcSKE ske, unsigned char *version,
   return status;
 }
 
+/* Callback that is called by the SKE to indicate that it is safe to
+   continue the execution of the protocol. Is given as argument to the 
+   silc_ske_initiator_finish or silc_ske_responder_phase_2 functions. 
+   This is called due to the fact that the public key verification
+   process is asynchronous and we must not continue the protocl until
+   the public key has been verified and this callback is called. */
+
+static void silc_client_protocol_ke_continue(SilcSKE ske,
+                                            void *context)
+{
+  SilcProtocol protocol = (SilcProtocol)context;
+  SilcClientKEInternalContext *ctx = 
+    (SilcClientKEInternalContext *)protocol->context;
+  SilcClient client = (SilcClient)ctx->client;
+  SilcClientConnection conn = ctx->sock->user_data;
+
+  SILC_LOG_DEBUG(("Start"));
+
+  if (ske->status != SILC_SKE_STATUS_OK) {
+    if (ske->status == SILC_SKE_STATUS_UNSUPPORTED_PUBLIC_KEY) {
+      client->ops->say(client, conn, 
+                      "Received unsupported server %s public key",
+                      ctx->sock->hostname);
+    } else if (ske->status == SILC_SKE_STATUS_PUBLIC_KEY_NOT_PROVIDED) {
+      client->ops->say(client, conn, 
+                      "Remote host did not send its public key, even though "
+                      "it must send it");
+    } else {
+      client->ops->say(client, conn,
+                      "Error during key exchange protocol with server %s",
+                      ctx->sock->hostname);
+    }
+    
+    protocol->state = SILC_PROTOCOL_STATE_ERROR;
+    silc_protocol_execute(protocol, client->timeout_queue, 0, 0);
+    return;
+  }
+
+  /* Send Ok to the other end. We will end the protocol as server
+     sends Ok to us when we will take the new keys into use. Do this
+     if we are initiator. This is happens when this callback was sent
+     to silc_ske_initiator_finish function. */
+  if (ctx->responder == FALSE) {
+    silc_ske_end(ctx->ske, ctx->send_packet, context);
+
+    /* End the protocol on the next round */
+    protocol->state = SILC_PROTOCOL_STATE_END;
+  }
+
+  /* Advance protocol state and call the next state if we are responder. 
+     This happens when this callback was sent to silc_ske_responder_phase_2
+     function. */
+  if (ctx->responder == TRUE) {
+    protocol->state++;
+    silc_protocol_execute(protocol, client->timeout_queue, 0, 100000);
+  }
+}
+
 /* Performs key exchange protocol. This is used for both initiator
    and responder key exchange. This may be called recursively. */
 
@@ -202,7 +289,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
     (SilcClientKEInternalContext *)protocol->context;
   SilcClient client = (SilcClient)ctx->client;
   SilcClientConnection conn = ctx->sock->user_data;
-  SilcSKEStatus status = 0;
+  SilcSKEStatus status = SILC_SKE_STATUS_OK;
 
   SILC_LOG_DEBUG(("Start"));
 
@@ -246,6 +333,10 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                                          context);
       }
 
+      /* Return now if the procedure is pending */
+      if (status == SILC_SKE_STATUS_PENDING)
+       return;
+
       if (status != SILC_SKE_STATUS_OK) {
        SILC_LOG_WARNING(("Error (type %d) during Key Exchange protocol",
                          status));
@@ -253,14 +344,14 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                        status));
 
        protocol->state = SILC_PROTOCOL_STATE_ERROR;
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 0);
+       silc_protocol_execute(protocol, client->timeout_queue, 0, 0);
        return;
       }
 
       /* Advance protocol state and call the next state if we are responder */
       protocol->state++;
       if (ctx->responder == TRUE)
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 100000);
+       silc_protocol_execute(protocol, client->timeout_queue, 0, 100000);
     }
     break;
   case 2:
@@ -291,14 +382,14 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                        status));
 
        protocol->state = SILC_PROTOCOL_STATE_ERROR;
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 0);
+       silc_protocol_execute(protocol, client->timeout_queue, 0, 0);
        return;
       }
 
       /* Advance protocol state and call next state if we are initiator */
       protocol->state++;
       if (ctx->responder == FALSE)
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 100000);
+       silc_protocol_execute(protocol, client->timeout_queue, 0, 100000);
     }
     break;
   case 3:
@@ -309,9 +400,12 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
       if (ctx->responder == TRUE) {
        /* Process the received Key Exchange 1 Payload packet from
           the initiator. This also creates our parts of the Diffie
-          Hellman algorithm. */
+          Hellman algorithm. The silc_client_protocol_ke_continue will
+          be called after the public key has been verified. */
        status = silc_ske_responder_phase_2(ctx->ske, ctx->packet->buffer, 
-                                           ctx->verify, context, NULL, NULL);
+                                           ctx->verify, context, 
+                                           silc_client_protocol_ke_continue,
+                                           context);
       } else {
        /* Call the Phase-2 function. This creates Diffie Hellman
           key exchange parameters and sends our public part inside
@@ -321,8 +415,13 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                                            client->private_key,
                                            ctx->send_packet,
                                            context);
+       protocol->state++;
       }
 
+      /* Return now if the procedure is pending */
+      if (status == SILC_SKE_STATUS_PENDING)
+       return;
+
       if (status != SILC_SKE_STATUS_OK) {
        SILC_LOG_WARNING(("Error (type %d) during Key Exchange protocol",
                          status));
@@ -330,14 +429,9 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                        status));
 
        protocol->state = SILC_PROTOCOL_STATE_ERROR;
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 0);
+       silc_protocol_execute(protocol, client->timeout_queue, 0, 0);
        return;
       }
-
-      /* Advance protocol state and call the next state if we are responder */
-      protocol->state++;
-      if (ctx->responder == TRUE)
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 100000);
     }
     break;
   case 4:
@@ -354,16 +448,24 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                                    SILC_SKE_PK_TYPE_SILC,
                                    ctx->send_packet,
                                    context);
-       status = 0;
+
+       /* End the protocol on the next round */
+       protocol->state = SILC_PROTOCOL_STATE_END;
       } else {
        /* Finish the protocol. This verifies the Key Exchange 2 payload
-          sent by responder. */
+          sent by responder. The silc_client_protocol_ke_continue will
+          be called after the public key has been verified. */
        status = silc_ske_initiator_finish(ctx->ske, ctx->packet->buffer,
-                                          ctx->verify, context, NULL, NULL);
+                                          ctx->verify, context, 
+                                          silc_client_protocol_ke_continue,
+                                          context);
       }
 
-      if (status != SILC_SKE_STATUS_OK) {
+      /* Return now if the procedure is pending */
+      if (status == SILC_SKE_STATUS_PENDING)
+       return;
 
+      if (status != SILC_SKE_STATUS_OK) {
         if (status == SILC_SKE_STATUS_UNSUPPORTED_PUBLIC_KEY) {
           client->ops->say(client, conn, 
                           "Received unsupported server %s public key",
@@ -374,17 +476,9 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                           ctx->sock->hostname);
         }
        protocol->state = SILC_PROTOCOL_STATE_ERROR;
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 0);
+       silc_protocol_execute(protocol, client->timeout_queue, 0, 0);
        return;
       }
-      
-      /* Send Ok to the other end. We will end the protocol as server
-        sends Ok to us when we will take the new keys into use. */
-      if (ctx->responder == FALSE)
-       silc_ske_end(ctx->ske, ctx->send_packet, context);
-      
-      /* End the protocol on the next round */
-      protocol->state = SILC_PROTOCOL_STATE_END;
     }
     break;
 
@@ -403,7 +497,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
                                             keymat);
       if (status != SILC_SKE_STATUS_OK) {
        protocol->state = SILC_PROTOCOL_STATE_ERROR;
-       protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 300000);
+       silc_protocol_execute(protocol, client->timeout_queue, 0, 300000);
        silc_ske_free_key_material(keymat);
        return;
       }
@@ -422,7 +516,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
 
       /* Protocol has ended, call the final callback */
       if (protocol->final_callback)
-       protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+       silc_protocol_execute_final(protocol, client->timeout_queue);
       else
        silc_protocol_free(protocol);
     }
@@ -439,7 +533,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
 
     /* On error the final callback is always called. */
     if (protocol->final_callback)
-      protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+      silc_protocol_execute_final(protocol, client->timeout_queue);
     else
       silc_protocol_free(protocol);
     break;
@@ -457,7 +551,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_key_exchange)
 
     /* On error the final callback is always called. */
     if (protocol->final_callback)
-      protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+      silc_protocol_execute_final(protocol, client->timeout_queue);
     else
       silc_protocol_free(protocol);
     break;
@@ -517,6 +611,47 @@ silc_client_get_public_key_auth(SilcClient client,
   return FALSE;
 }
 
+/* Continues the connection authentication protocol. This funtion may
+   be called directly or used as SilcAskPassphrase callback. */
+
+static void 
+silc_client_conn_auth_continue(unsigned char *auth_data,
+                              uint32 auth_data_len, void *context)
+{
+  SilcProtocol protocol = (SilcProtocol)context;
+  SilcClientConnAuthInternalContext *ctx = 
+    (SilcClientConnAuthInternalContext *)protocol->context;
+  SilcClient client = (SilcClient)ctx->client;
+  SilcBuffer packet;
+  int payload_len = 0;
+
+  SILC_LOG_DEBUG(("Start"));
+
+  payload_len = 4 + auth_data_len;
+  packet = silc_buffer_alloc(payload_len);
+  silc_buffer_pull_tail(packet, SILC_BUFFER_END(packet));
+  silc_buffer_format(packet,
+                    SILC_STR_UI_SHORT(payload_len),
+                    SILC_STR_UI_SHORT(SILC_SOCKET_TYPE_CLIENT),
+                    SILC_STR_UI_XNSTRING(auth_data, auth_data_len),
+                    SILC_STR_END);
+
+  /* Send the packet to server */
+  silc_client_packet_send(client, ctx->sock,
+                         SILC_PACKET_CONNECTION_AUTH,
+                         NULL, 0, NULL, NULL,
+                         packet->data, packet->len, TRUE);
+
+  if (auth_data) {
+    memset(auth_data, 0, auth_data_len);
+    silc_free(auth_data);
+  }
+  silc_buffer_free(packet);
+      
+  /* Next state is end of protocol */
+  protocol->state = SILC_PROTOCOL_STATE_END;
+}
+                                                   
 SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
 {
   SilcProtocol protocol = (SilcProtocol)context;
@@ -537,8 +672,6 @@ SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
        * Start protocol. We send authentication data to the server
        * to be authenticated.
        */
-      SilcBuffer packet;
-      int payload_len = 0;
       unsigned char *auth_data = NULL;
       uint32 auth_data_len = 0;
 
@@ -558,8 +691,10 @@ SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
        client->ops->say(client, conn, 
                         "Password authentication required by server %s",
                         ctx->sock->hostname);
-       auth_data = client->ops->ask_passphrase(client, conn);
-       auth_data_len = strlen(auth_data);
+       client->ops->ask_passphrase(client, conn,
+                                   silc_client_conn_auth_continue,
+                                   protocol);
+       return;
        break;
 
       case SILC_AUTH_PUBLIC_KEY:
@@ -576,29 +711,8 @@ SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
        }
       }
 
-      payload_len = 4 + auth_data_len;
-      packet = silc_buffer_alloc(payload_len);
-      silc_buffer_pull_tail(packet, SILC_BUFFER_END(packet));
-      silc_buffer_format(packet,
-                        SILC_STR_UI_SHORT(payload_len),
-                        SILC_STR_UI_SHORT(SILC_SOCKET_TYPE_CLIENT),
-                        SILC_STR_UI_XNSTRING(auth_data, auth_data_len),
-                        SILC_STR_END);
-
-      /* Send the packet to server */
-      silc_client_packet_send(client, ctx->sock,
-                             SILC_PACKET_CONNECTION_AUTH,
-                             NULL, 0, NULL, NULL,
-                             packet->data, packet->len, TRUE);
-
-      if (auth_data) {
-       memset(auth_data, 0, auth_data_len);
-       silc_free(auth_data);
-      }
-      silc_buffer_free(packet);
-      
-      /* Next state is end of protocol */
-      protocol->state = SILC_PROTOCOL_STATE_END;
+      silc_client_conn_auth_continue(auth_data,
+                                    auth_data_len, protocol);
     }
     break;
 
@@ -610,7 +724,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
 
       /* Protocol has ended, call the final callback */
       if (protocol->final_callback)
-       protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+       silc_protocol_execute_final(protocol, client->timeout_queue);
       else
        silc_protocol_free(protocol);
     }
@@ -632,7 +746,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
 
       /* On error the final callback is always called. */
       if (protocol->final_callback)
-       protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+       silc_protocol_execute_final(protocol, client->timeout_queue);
       else
        silc_protocol_free(protocol);
     }
@@ -644,7 +758,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_connection_auth)
 
     /* On error the final callback is always called. */
     if (protocol->final_callback)
-      protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+      silc_protocol_execute_final(protocol, client->timeout_queue);
     else
       silc_protocol_free(protocol);
     break;
@@ -834,8 +948,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
          if (ctx->packet->type != SILC_PACKET_KEY_EXCHANGE_1) {
            /* Error in protocol */
            protocol->state = SILC_PROTOCOL_STATE_ERROR;
-           protocol->execute(client->timeout_queue, 0, protocol, fd, 
-                             0, 300000);
+           silc_protocol_execute(protocol, client->timeout_queue, 0, 300000);
          }
 
          ctx->ske = silc_ske_alloc();
@@ -851,14 +964,13 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
                              status));
            
            protocol->state = SILC_PROTOCOL_STATE_ERROR;
-           protocol->execute(client->timeout_queue, 0, 
-                             protocol, fd, 0, 300000);
+           silc_protocol_execute(protocol, client->timeout_queue, 0, 300000);
            return;
          }
 
          /* Advance the protocol state */
          protocol->state++;
-         protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 0);
+         silc_protocol_execute(protocol, client->timeout_queue, 0, 0);
        } else {
          /*
           * Do normal and simple re-key.
@@ -908,8 +1020,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
                              status));
            
            protocol->state = SILC_PROTOCOL_STATE_ERROR;
-           protocol->execute(client->timeout_queue, 0, 
-                             protocol, fd, 0, 300000);
+           silc_protocol_execute(protocol, client->timeout_queue, 0, 300000);
            return;
          }
 
@@ -959,8 +1070,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
                              status));
            
            protocol->state = SILC_PROTOCOL_STATE_ERROR;
-           protocol->execute(client->timeout_queue, 0, 
-                             protocol, fd, 0, 300000);
+           silc_protocol_execute(protocol, client->timeout_queue, 0, 300000);
            return;
          }
       }
@@ -973,7 +1083,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
        if (ctx->packet->type != SILC_PACKET_KEY_EXCHANGE_2) {
          /* Error in protocol */
          protocol->state = SILC_PROTOCOL_STATE_ERROR;
-         protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 300000);
+         silc_protocol_execute(protocol, client->timeout_queue, 0, 300000);
        }
        
        status = silc_ske_initiator_finish(ctx->ske, ctx->packet->buffer,
@@ -983,8 +1093,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
                            status));
          
          protocol->state = SILC_PROTOCOL_STATE_ERROR;
-         protocol->execute(client->timeout_queue, 0, 
-                           protocol, fd, 0, 300000);
+         silc_protocol_execute(protocol, client->timeout_queue, 0, 300000);
          return;
        }
       }
@@ -1012,7 +1121,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
     if (ctx->packet->type != SILC_PACKET_REKEY_DONE) {
       /* Error in protocol */
       protocol->state = SILC_PROTOCOL_STATE_ERROR;
-      protocol->execute(client->timeout_queue, 0, protocol, fd, 0, 0);
+      silc_protocol_execute(protocol, client->timeout_queue, 0, 0);
     }
 
     /* We received the REKEY_DONE packet and all packets after this is
@@ -1021,7 +1130,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
 
     /* Protocol has ended, call the final callback */
     if (protocol->final_callback)
-      protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+      silc_protocol_execute_final(protocol, client->timeout_queue);
     else
       silc_protocol_free(protocol);
     break;
@@ -1040,7 +1149,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
 
     /* On error the final callback is always called. */
     if (protocol->final_callback)
-      protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+      silc_protocol_execute_final(protocol, client->timeout_queue);
     else
       silc_protocol_free(protocol);
     break;
@@ -1052,7 +1161,7 @@ SILC_TASK_CALLBACK(silc_client_protocol_rekey)
 
     /* On error the final callback is always called. */
     if (protocol->final_callback)
-      protocol->execute_final(client->timeout_queue, 0, protocol, fd);
+      silc_protocol_execute_final(protocol, client->timeout_queue);
     else
       silc_protocol_free(protocol);
     break;