Check-in [901360a4c6]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Test otrify, works
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 901360a4c636ab140823e6f25e139c7664b9411f
User & Date: bernd 2019-08-21 21:01:08
Context
2019-08-22
11:22
Bump version number check-in: c7456d90e9 user: bernd tags: trunk, 0.9.1-20190822
2019-08-21
21:01
Test otrify, works check-in: 901360a4c6 user: bernd tags: trunk
20:04
Add preferrence ipv6/ipv4 switch for dht connection check-in: e961e252cc user: bernd tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to addr.fs.

   125    125   
   126    126   : addr>4sock ( -- )
   127    127       host:key @ dest-0key< !
   128    128       host:portv4 w@ sockaddr1 port be-w!
   129    129       host:ipv4 be-ul@ sockaddr1 ipv4!
   130    130       host:route $@ !temp-addr ;
   131    131   
   132         -: addr>sock6 { xt -- }
   133         -    ipv6( host:ipv6 ip6?   IF  addr>6sock o o> >r xt execute  r> >o THEN ) ;
   134         -: addr>sock4 { xt -- }
   135         -    ipv4( host:ipv4 be-ul@ IF  addr>4sock o o> >r xt execute  r> >o THEN ) ;
   136         -
   137    132   : addr>sock ( o xt -- ) { xt } >o
   138         -    ipv64( xt addr>sock6 xt addr>sock4 )else( xt addr>sock4 xt addr>sock6 ) o> ;
          133  +    ipv64(
          134  +    ipv6( host:ipv6 ip6?   IF  addr>6sock o o> >r xt execute  r> >o THEN )
          135  +    ipv4( host:ipv4 be-ul@ IF  addr>4sock o o> >r xt execute  r> >o THEN )
          136  +    )else(
          137  +    ipv4( host:ipv4 be-ul@ IF  addr>4sock o o> >r xt execute  r> >o THEN )
          138  +    ipv6( host:ipv6 ip6?   IF  addr>6sock o o> >r xt execute  r> >o THEN )
          139  +    )
          140  +    o> ;
   139    141   
   140    142   : +my-id ( -- )
   141    143       config:prio# @ host:pri# !
   142    144       host$ $@ host:id $!
   143    145       my-0key @ IF  my-0key sec@ host:key sec!  THEN ;
   144    146   
   145    147   : +my-addrs ( port o:addr -- )

Changes to msg.fs.

   525    525       ELSE  pk-sig?  THEN ;
   526    526   
   527    527   : msg-dec?-sig? ( addr u -- addr' u' flag )
   528    528       2dup 2 - + c@ $80 and IF  msg-dec-sig?  ELSE  msg-sig?  THEN ;
   529    529   
   530    530   : replace-sig { addrsig usig addrmsg umsg -- }
   531    531       addrsig usig addrmsg umsg usig - [: type type ;] $tmp
   532         -    2dup dump
   533    532       2dup msg-dec?-sig? !!sig!! 2drop addrmsg umsg smove ;
   534    533   : new-otrsig ( addr u flag -- addrsig usig )
   535    534       >r 2dup startdate@ old>otr
   536    535       predate-key keccak# c:key@ c:key# smove
   537    536       [: sktmp pkmod sk@ drop >modkey .encsign-rest ;]
   538    537       ['] .sig r@ select $tmp
   539    538       2dup + 2 - r> swap orc!
   540         -    2dup dump 1 64s /string ;
          539  +    ( 2dup dump ) 1 64s /string ;
   541    540   
   542    541   :noname { sig u' addr u -- }
   543    542       u' 64'+ u =  u sigsize# = and IF
   544    543   	last# >r last# $@ >group
   545    544   	addr u startdate@ 64dup date>i >r 64#1 64+ date>i' r>
   546    545   	2dup = IF  ."  [otrified] "  addr u startdate@ .ticks  THEN
   547    546   	U+DO