wok-current rev 19907

Add crypthook
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Apr 10 18:13:03 2017 +0200 (2017-04-10)
parents 2bd6324d64bf
children 010408d83eb3
files crypthook/receipt linld/stuff/src/VCPI.ASM
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/crypthook/receipt	Mon Apr 10 18:13:03 2017 +0200
     1.3 @@ -0,0 +1,30 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="crypthook"
     1.7 +GITHASH="0728cd191f0638f52f8d6af8a9482a4996322ffc"
     1.8 +VERSION=${GITHASH:0:7}
     1.9 +CATEGORY="security"
    1.10 +SHORT_DESC="TCP/UDP symmetric encryption tunnel wrapper."
    1.11 +MAINTAINER="pascal.bellard@slitaz.org"
    1.12 +LICENSE="MIT"
    1.13 +TARBALL="$PACKAGE-$VERSION.zip"
    1.14 +WEB_SITE="https://github.com/chokepoint/CryptHook"
    1.15 +WGET_URL="$WEB_SITE/archive/$GITHASH.zip"
    1.16 +
    1.17 +DEPENDS="libcrypto"
    1.18 +BUILD_DEPENDS="openssl-dev"
    1.19 +
    1.20 +# Rules to configure and make the package.
    1.21 +compile_rules()
    1.22 +{
    1.23 +	make
    1.24 +}
    1.25 +
    1.26 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.27 +genpkg_rules()
    1.28 +{
    1.29 +	mkdir -p $fs/usr/lib $install/usr/share/doc
    1.30 +	cp -a $src/README.md $install/usr/share/doc
    1.31 +	cp -a $src/crypthook.so $fs/usr/lib
    1.32 +}
    1.33 +
     2.1 --- a/linld/stuff/src/VCPI.ASM	Mon Apr 10 16:50:02 2017 +0200
     2.2 +++ b/linld/stuff/src/VCPI.ASM	Mon Apr 10 18:13:03 2017 +0200
     2.3 @@ -376,6 +376,7 @@
     2.4                  mov     ecx,cr3         ; reload TLB cache
     2.5                  mov     cr3,ecx         ;
     2.6  ; Return
     2.7 +vcpi_ret:
     2.8                  ret
     2.9  
    2.10          endp    call_pm_routine
    2.11 @@ -393,14 +394,13 @@
    2.12                  p8086
    2.13  		extrn	_vcpi:byte
    2.14  		test	[_vcpi],-1
    2.15 -		jz	@@ret
    2.16 +		jz	vcpi_ret
    2.17                  p386
    2.18 +                pop	ax
    2.19 +                push    cs      ;*
    2.20 +                push	ax
    2.21                  push	si
    2.22 -              ;;pushf
    2.23 -              ;;pushad
    2.24 -                push    cs      ;*
    2.25                  push    ds
    2.26 -                ;push    es
    2.27                  mov     [saved_ss],ss
    2.28                  mov     [saved_sp],sp
    2.29  
    2.30 @@ -418,23 +418,13 @@
    2.31                  mov     eax,cr0
    2.32                  and     eax,7ffffffeh   ; clear PG,P bits
    2.33                  mov     cr0,eax         ; look mommy, we're in rm now!
    2.34 -              ;;jmp     short $+2
    2.35 -              ;;xor     eax,eax
    2.36                  mov     cr3,eax         ; flush TLB cache
    2.37  
    2.38  ; Now we are in rm, but not yet: have to restore sregs:
    2.39                  lss     sp,[saved_ss_sp]; SS
    2.40 -                ;pop     es              ; ES
    2.41                  pop     ds              ; DS
    2.42 -               ;push    cs      ;* done earlier
    2.43 -                push    offset @@next
    2.44 +                pop	si
    2.45                  retf                    ; CS
    2.46 -@@next:
    2.47 -              ;;popad
    2.48 -              ;;popf
    2.49 -                pop	si
    2.50 -@@ret:
    2.51 -                ret             ; We don't care much about rest (FS/GS)
    2.52  
    2.53          endp    _vm2rm
    2.54