diff -Nacr w3m-0.1.10.orig/configure w3m-0.1.10/configure
*** w3m-0.1.10.orig/configure	Mon Jun  5 05:41:35 2000
--- w3m-0.1.10/configure	Tue Jul 18 09:59:01 2000
***************
*** 181,186 ****
--- 181,187 ----
    echo "use_mouse=$use_mouse" >> config.param
    echo "use_cookie=$use_cookie" >> config.param
    echo "use_ssl=$use_ssl" >> config.param
+   echo "use_idea=$use_idea" >> config.param
    if [ -n "$dmodel" ]; then
      echo "dmodel=$dmodel" >> config.param
    fi
***************
*** 231,236 ****
--- 232,282 ----
    fi
  }
  
+ find_krb5() {
+   krb5include=""
+   def_krb5dir=""
+   for i1 in /usr/local /opt
+   do
+     for i2 in /krb5 
+     do
+       dirname=${i1}${i2}
+       if [ -f $dirname/include/krb5.h ]; then
+         krb5include="-I${dirname}/include"
+       fi
+       for i3 in lib
+       do
+         dirname=${i1}${i2}/${i3}
+         if [ -f $dirname/libkrb5.a ]; then
+ 		  def_krb5dir="${dirname}"
+ 		  krb5lib="-L${def_krb5dir}"
+ 		  for i4 in gssapi_krb5 krb5 com_err
+ 		  do
+ 			if [ -f $dirname/lib${i4}.a ]; then
+ 			  krb5lib="$krb5lib -l${i4}"
+ 			fi
+ 		  done
+           if [ -f $dirname/libcrypto.a ]; then
+ 			krb5lib="$krb5lib $dirname/libcrypto.a"
+ 		  fi
+         fi
+       done
+     done
+   done
+   if [ "$krb5include" = "" ]; then
+     echo "Where is krb5.h? (for example, /usr/local/krb5/include)"
+     Echo ":"
+     read ks_ans
+     krb5include="-I${ks_ans}"
+   fi
+   if [ "$def_krb5dir" = "" ]; then
+     echo "Where is libkrb5.a? (for example, /usr/local/krb5/lib)"
+     Echo ":"
+     read def_krb5dir
+     krb5lib="-L${def_krb5dir} -lgssapi_krb5 -lkrb5 -lcom_err"
+ 	krb5lib="$krb5lib ${def_krb5dir}/libcrypto.a"
+   fi
+ }
+ 
  #--------------------------------------------------------------
  if [ -n "$USER" ]; then
  	user=$USER
***************
*** 462,467 ****
--- 508,514 ----
      use_mouse=n; def_mouse="#undef MOUSE"
      use_cookie=n; def_cookie="#undef USE_COOKIE"
      use_ssl=n; def_ssl="#undef USE_SSL"
+     use_idea=n; def_idea="#define NO_IDEA"
      save_params
      customized=y
      ;;
***************
*** 471,476 ****
--- 518,524 ----
      use_mouse=n; def_mouse="#undef MOUSE"
      use_cookie=n; def_cookie="#undef USE_COOKIE"
      use_ssl=n; def_ssl="#undef USE_SSL"
+     use_idea=n; def_idea="#define NO_IDEA"
      save_params
      customized=y
      ;;
***************
*** 480,485 ****
--- 528,534 ----
      use_mouse=y; def_mouse="#define MOUSE"
      use_cookie=n; def_cookie="#undef USE_COOKIE"
      use_ssl=n; def_ssl="#undef USE_SSL"
+     use_idea=n; def_idea="#define NO_IDEA"
      save_params
      customized=y
      ;;
***************
*** 489,494 ****
--- 538,544 ----
      use_mouse=y; def_mouse="#define MOUSE"
      use_cookie=y; def_cookie="#define USE_COOKIE"
      use_ssl=n; def_ssl="#undef USE_SSL"
+     use_idea=n; def_idea="#define NO_IDEA"
      save_params
      customized=y
      ;;
***************
*** 498,504 ****
--- 548,556 ----
      use_mouse=y; def_mouse="#define MOUSE"
      use_cookie=y; def_cookie="#define USE_COOKIE"
      use_ssl=y; def_ssl="#define USE_SSL"
+     use_idea=n; def_idea="#define NO_IDEA"
      find_ssl
+     find_krb5
      save_params
      customized=y
      ;;
***************
*** 588,593 ****
--- 640,675 ----
    sslinclude=""
  fi
  
+ if [ "$use_ssl" = y ]; then
+ echo "Do you want to use IDEA with SSL?"
+ echo '(You need openSSL library; Please see http://www.openssl.org/)'
+ yesno use_idea "$use_idea" n
+ echo "use_idea=$use_idea" >> config.param
+ if [ "$use_idea" = y ]; then
+   def_idea="#undef NO_IDEA"
+ else
+   def_idea="#define NO_IDEA"
+   sslinclude="$sslinclude -DNO_IDEA"
+ fi
+ fi
+ 
+ if [ "$use_ssl" = y ]; then
+ echo "Do you want to use Kerberos with SSL?"
+ echo '(You need KRB5 library; Please see http://web.mit.edu/kerberos/www/)'
+ yesno use_krb5 "$use_krb5" y
+ echo "use_krb5=$use_krb5" >> config.param
+ if [ "$use_krb5" = y ]; then
+   find_krb5
+   def_krb5dir="$def_krb5dir"
+   krb5lib="$krb5lib"
+   krb5include="$krb5include"
+ else
+   def_krb5dir=""
+   krb5lib=""
+   krb5include=""
+ fi
+ fi
+ 
  fi
  
  if [ "$use_ssl" = y ]; then
***************
*** 761,767 ****
      searchlibs="socket nsl"
      ;;
    *)
!     searchlibs="bsd BSD 44bsd socket nsl"
      ;;
  esac
  for lib in $searchlibs
--- 843,849 ----
      searchlibs="socket nsl"
      ;;
    *)
!     searchlibs="bsd BSD 44bsd socket nsl resolv"
      ;;
  esac
  for lib in $searchlibs
***************
*** 1446,1455 ****
  HELP_DIR = $helpdir
  LIB_DIR = $suplibdir
  HELP_FILE = $helpfile
! SYS_LIBRARIES = $gpmlib $extlib $termlib $ssllib $v6lib
  LOCAL_LIBRARIES = $ldflags
  CC = $cc
! MYCFLAGS = $cflags $bsdinclude $sslinclude
  KEYBIND_SRC = $keymap_file.c
  KEYBIND_OBJ = $keymap_file.o
  EXT=$extension
--- 1528,1537 ----
  HELP_DIR = $helpdir
  LIB_DIR = $suplibdir
  HELP_FILE = $helpfile
! SYS_LIBRARIES = $gpmlib $extlib $termlib $ssllib $v6lib $krb5lib
  LOCAL_LIBRARIES = $ldflags
  CC = $cc
! MYCFLAGS = $cflags $bsdinclude $sslinclude $krb5include
  KEYBIND_SRC = $keymap_file.c
  KEYBIND_OBJ = $keymap_file.o
  EXT=$extension
***************
*** 1476,1481 ****
--- 1558,1564 ----
  $def_menu
  $def_cookie
  $def_ssl
+ $def_idea
  $def_use_ssl_verify
  $def_ftppass_hostnamegen
  $def_show_params
diff -Nacr w3m-0.1.10.orig/display.c w3m-0.1.10/display.c
*** w3m-0.1.10.orig/display.c	Tue Jun  6 01:39:13 2000
--- w3m-0.1.10/display.c	Tue Jul 18 10:01:02 2000
***************
*** 717,724 ****
--- 717,726 ----
      }
      else {
          buf->pos = l->len -1;
+ #ifdef JP_CHARSET
          if (CharType(p[buf->pos]) == PC_KANJI2)
              buf->pos--;
+ #endif				/* JP_CHARSET */
      }
      cpos = COLPOS(l, buf->pos);
      buf->visualpos = cpos - buf->currentColumn;
diff -Nacr w3m-0.1.10.orig/url.c w3m-0.1.10/url.c
*** w3m-0.1.10.orig/url.c	Mon Jun  5 19:39:28 2000
--- w3m-0.1.10/url.c	Tue Jul 18 10:00:05 2000
***************
*** 169,175 ****
  }
  
  SSL *
! openSSLHandle(int sock)
  {
      SSL *handle;
  #ifdef USE_SSL_VERIFY
--- 169,175 ----
  }
  
  SSL *
! openSSLHandle(int sock, char *host)
  {
      SSL *handle;
  #ifdef USE_SSL_VERIFY
***************
*** 178,183 ****
--- 178,184 ----
  	ssl_ctx = NULL;
  	ssl_path_modified = 0;
      }
+     yaapp_RAND_load_file(NULL, NULL, 0);
  #endif				/* defined(USE_SSL_VERIFY) */
      if (ssl_ctx == NULL) {
  #if SSLEAY_VERSION_NUMBER < 0x0800
***************
*** 211,216 ****
--- 212,220 ----
      }
      handle = SSL_new(ssl_ctx);
      SSL_set_fd(handle, sock);
+ 	if (host && handle->kssl_ctx) {
+ 	    kssl_ctx_setstring(handle->kssl_ctx, KSSL_SERVER, host);
+ 	}
      if (SSL_connect(handle) <= 0)
  	return NULL;
      return handle;
***************
*** 1156,1162 ****
  #ifdef USE_SSL
  	    if (pu->scheme == SCM_HTTPS && *status == HTST_CONNECT) {
  		sock = ouf->stream.ss->sock;
! 		if (!(sslh = openSSLHandle(sock))) {
  		    *status = HTST_MISSING;
  		    return uf;
  		}
--- 1160,1166 ----
  #ifdef USE_SSL
  	    if (pu->scheme == SCM_HTTPS && *status == HTST_CONNECT) {
  		sock = ouf->stream.ss->sock;
! 		if (!(sslh = openSSLHandle(sock, pu->host))) {
  		    *status = HTST_MISSING;
  		    return uf;
  		}
***************
*** 1211,1217 ****
  	    }
  #ifdef USE_SSL
  	    if (pu->scheme == SCM_HTTPS) {
! 		if (!(sslh = openSSLHandle(sock))) {
  		    *status = HTST_MISSING;
  		    return uf;
  		}
--- 1215,1221 ----
  	    }
  #ifdef USE_SSL
  	    if (pu->scheme == SCM_HTTPS) {
! 		if (!(sslh = openSSLHandle(sock, pu->host))) {
  		    *status = HTST_MISSING;
  		    return uf;
  		}
