win10 linux 子系统 及 Fizz (tls1.3实现代码) 编译

启用linux子系统步骤:

控制面板 =》 程序与功能 =》关闭和启用windows功能 =》 从列表里面找到linux子系统项,然后勾上,确定,装完重启。

 

重启后, 可以通过在cmd控制台中输入 bash 来打开shell。

查看版本:

YYY@HFWin10:/mnt/c/Users/lenovo$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

 

升级重装:

lxrun /uninstall /full /y        #先卸载旧的

lxrun /install /y                   #或者从windows app store 搜索 ubuntu 来下载安装,约200M左右

 

添加下载源:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #备份
sudo vim /etc/apt/sources.list #修改

# 添加阿里软件源地址:

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get install software-properties-common

sudo apt-get update #刷新系统下载源

 

准备编译工具和相关库:

apt install g++

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created

晦气~~~pepepe!!!!!

https://mirrors.ustc.edu.cn/ubuntu/

手动下载deb包,dpkg -i xxx.deb

 

sudo apt-get install \
    cmake \
    libboost-all-dev \
    libevent-dev \
    libdouble-conversion-dev \
    libgoogle-glog-dev \
    libgflags-dev \
    libiberty-dev \
    liblz4-dev \
    liblzma-dev \
    libsnappy-dev \
    make \
    zlib1g-dev \
    binutils-dev \
    libjemalloc-dev \
    libssl-dev \
    pkg-config

 

两个库无可用软件源,得下载源码编译安装:

libsodium
folly

先编译安装 libsodium

 

 

搞半天, 适版的g++都没装上, linux 竟还是这么扯。。。

 

最后, 换了份代码, 不试Fizz了, 改用 WOLFSSL 测试。。。。。

https://github.com/wolfSSL/wolfssl

https://www.wolfssl.com

 

WOLFSSL_TLS13
HAVE_HKDF
HAVE_FFDHE_2048
WC_RSA_PSS
enable-sniffer
 

 

加上这几个预编译宏,可以直接用vs2015编译出exe来玩

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值