Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use quic #33

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5e9770c
add .gitignore
TaigaKoma Apr 16, 2019
45addb5
update submodule
TaigaKoma Apr 16, 2019
8c558ea
modified Makefile to enable tls13
TaigaKoma Apr 16, 2019
850662b
modified user_settings.h to use tls13
TaigaKoma Apr 17, 2019
7ea258c
modified gitignore to build on mac
TaigaKoma Apr 17, 2019
cc4df08
modified gitmodules
TaigaKoma Apr 17, 2019
08499f2
modified Makefile
TaigaKoma Apr 19, 2019
d293723
modified client program to add ecc-cert and not to use dhcp
TaigaKoma Apr 22, 2019
77e6ba3
minor update for TLS1.3
TaigaKoma Apr 22, 2019
d8dbaa1
add picoquic and picotls submodules
TaigaKoma Apr 22, 2019
046f197
delete unnecessary code
TaigaKoma Apr 26, 2019
40a333b
add quicClient (unfinished)
TaigaKoma May 3, 2019
4140cd7
set random bytes generator
TaigaKoma Jun 24, 2019
4ca1215
Make debug logs easy to see
TaigaKoma Jun 24, 2019
9c7663b
remove unnecessary lwip option (TCP)
TaigaKoma Jun 24, 2019
e76fe47
modified syslog function to operate like printf
TaigaKoma Jun 24, 2019
b6a5737
Update submodules
TaigaKoma Jun 24, 2019
6e07336
minor fix
TaigaKoma Jul 11, 2019
41a0d1d
modified settings to use wolfcrypt
TaigaKoma Jul 11, 2019
ba8d22b
update submodules to use wolfcrypt
TaigaKoma Jul 11, 2019
cbf6f36
enable certificate buffer
TaigaKoma Jul 17, 2019
df5be7a
minor fix
TaigaKoma Jul 18, 2019
a99d875
update picotls-submodule
TaigaKoma Jul 18, 2019
6404ddb
add ticket buffer
TaigaKoma Sep 4, 2019
fd940ce
remove unnecessary files for Makefile
TaigaKoma Oct 3, 2019
2eeea65
add testquicfiles and certs for test
TaigaKoma Oct 3, 2019
751f51c
modified quicClient app
TaigaKoma Oct 24, 2019
56c6d4b
modified q_settig file to separate tls function
TaigaKoma Oct 24, 2019
ca0df22
add picotlsClient (not completed)
TaigaKoma Oct 28, 2019
cc85ab0
modified picotlsClient
TaigaKoma Nov 25, 2019
efbbdd9
modified quicClient & removed unnecessary code
TaigaKoma Nov 25, 2019
1eae7f5
minor update
TaigaKoma Nov 26, 2019
e70e625
removed unnecessary files for picotls
TaigaKoma Nov 26, 2019
8d89e0a
minor update
TaigaKoma Feb 14, 2020
d44592b
update submodule
TaigaKoma Feb 14, 2020
d8fbc37
update README
TaigaKoma Feb 14, 2020
cbd7bf5
minor update
TaigaKoma Feb 14, 2020
8cfce6f
remove picotls/lib/openssl.c
TaigaKoma Mar 17, 2020
8b57543
add wolfssl/picotls/picoquic-library
TaigaKoma Mar 23, 2020
6649fb1
update submodule
TaigaKoma Mar 23, 2020
6a878db
update submodule
TaigaKoma Mar 24, 2020
e3e75f1
minor update
TaigaKoma Mar 25, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
asp-1.9.2-utf8/cfg/cfg/*
*.o
*.d
*.a
.DS_Store
examples/truestudio/.metadata/
examples/truestudio/*/GR-PEACH_mbed.map
examples/truestudio/*/asp.*
examples/truestudio/*/cfg1_out.*
examples/truestudio/*/kernel_cfg.*
examples/truestudio/*/offset.h
examples/*/GR-PEACH_mbed.map
examples/*/asp*
examples/*/cfg1_out*
examples/*/kernel_cfg.*
examples/*/offset.h
examples/*/Makefile.depend
10 changes: 8 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[submodule "wolfSSL-lib/wolfssl"]
path = wolfSSL-lib/wolfssl
url = https://github.com/ncesnagoya/wolfssl.git
branch = minor-change
url = https://github.com/ertlnagoya/wolfssl
ignore = dirty
[submodule "picotls-lib/picotls"]
path = picotls-lib/picotls
url = https://github.com/ertlnagoya/picotls
[submodule "picoquic-lib/picoquic"]
path = picoquic-lib/picoquic
url = https://github.com/ertlnagoya/picoquic
2 changes: 1 addition & 1 deletion asp-1.9.2-utf8/Makefile.asp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ up:
#
.PHONY: clean
clean:
rm -f $(LIB).a $(ALL_OBJ) $(DEPS)
rm -f $(LIB).a $(WOLF_LIB).a $(PTLS_LIB).a $(PQUIC_LIB).a $(ALL_OBJ) $(DEPS) $(WOLFSSL_OBJ) $(PTLS_OBJ) $(PQUIC_OBJ)
rm -f \#* *~ *.o $(CLEAN_FILES)
rm -f $(OBJFILE) $(OBJNAME).syms $(OBJNAME).srec $(OBJNAME).bin
rm -f kernel_cfg.timestamp $(CFG2_OUT_SRCS)
Expand Down
2 changes: 1 addition & 1 deletion asp-1.9.2-utf8/library/test_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ syslog_flush(void)
}
if (logbuf.logtype >= LOG_TYPE_COMMENT) {
syslog_print(&logbuf, target_fput_log);
target_fput_log('\n');
//target_fput_log('\n');
}
}
}
Expand Down
62 changes: 62 additions & 0 deletions examples/picotlsClient/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#
# ターゲットの指定(Makefile.targetで上書きされるのを防ぐため)
#
all:

#
# アプリケーションファイル
#
APPLNAME = picotlsClient
USE_CXX = true
APPL_CFG = $(APPLNAME).cfg

DEBUG = true
OMIT_OPTIMIZATION = true

#
# ライブラリのディレクトリの定義
#
MBED_LIB_DIR = ../../mbed-lib
WOLFSSL_ROOT_DIR = ../../wolfSSL-lib
WOLFSSL_LIB_DIR = $(WOLFSSL_ROOT_DIR)/wolfssl
PICOTLS_ROOT_DIR = ../../picotls-lib
PICOTLS_LIB_DIR = $(PICOTLS_ROOT_DIR)/picotls
MINICRYPTO_LIB_DIR = $(PICOTLS_LIB_DIR)/deps

#
# ASPソースファイルのディレクトリの定義
#
SRCDIR = ../../asp-1.9.2-utf8

#
# 実行形式
#
EXECUTE_ON = ROM

#
# picotlsライブラリ
#
include $(PICOTLS_ROOT_DIR)/Makefile

#
# wolfSSLライブラリ
#
include $(WOLFSSL_ROOT_DIR)/Makefile

#
# MBEDライブラリのビルド
#
include $(MBED_LIB_DIR)/common/Makefile.cmn
include $(MBED_LIB_DIR)/mbed-src/Makefile.src
include $(MBED_LIB_DIR)/EthernetInterface/Makefile.eif
include $(MBED_LIB_DIR)/mbed-rpc/Makefile.rpc
include $(MBED_LIB_DIR)/HttpServer_snapshot/Makefile.hss
include $(MBED_LIB_DIR)/FATFileSystem/Makefile.ffs
include $(MBED_LIB_DIR)/i2c/Makefile.i2c
include $(MBED_LIB_DIR)/Makefile.mbd

#
# ASPカーネルライブラリ
#
KERNEL_LIB = .
include $(SRCDIR)/Makefile.asp
35 changes: 35 additions & 0 deletions examples/picotlsClient/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 概要:
picotlsClientは簡単なTLSクライアントのサンプルプログラムです。
GR-PEACH, mbed + TOPPERS環境で動作します。
プログラムをターゲットボードにダウンロードして起動すると、プログラム内で指定されているTLSサーバに
対してTLS接続し、簡単なメッセージを送信します。その後、TLSサーバからのメッセージを受信し、プログラムを
終了します。受信したメッセージはCOMポートを通じてPC上のターミナルに表示されます。
デフォルトでは、簡単なHTTP GETリクエストを送信するようになっていて、同サーバのwebページを受信します。
TLSライブラリとしてpicotls、暗号ライブラリとしてwolfSSLの暗号モジュールを利用しています。

### 動作環境:
GR-PEACH, 有線ネットワーク接続、ダウンロード、デバッグメッセージ用COMポート

## インストール方法:
### 1)基本部のダウンロード
GITHUBからGR-PEACH, mbed+TOPPERSのプロジェクト一式をPC上にダウンロードします。
https://github.com/ncesnagoya/asp-gr_peach_gcc-mbed

### 2)submoduleのダウンロード
以下のコマンドを実行し、サブモジュール(picoquic、picotls、wolfSSL)をダウンロードします。
```
% git submodule init
% git submodule update
```
wolfSSLは実験、社内評価などの目的で無償GPLv2ライセンスで利用できます。商用利用の場合は
別途商用ライセンスを取得していください。
###3)ビルド、ダウンロード、実行
#### macでの実行方法:
examples/picotlsClientに移動し、下記のコマンドを実行
```
% make depend
% make
```
生成された picotlsClient.binをGR-PEACHにドラッグ&ドロップし、実行します。

接続先、送信メッセージなどはpicotlsClient.cppで定義してあるので、適宜変更することができます。
24 changes: 24 additions & 0 deletions examples/picotlsClient/picotlsClient.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* $Id: picotlsClient.cfg 2416 2012-09-07 08:06:20Z ertl-hiro $
*/

/*
* picotlsサンプルプログラムのシステムコンフィギュレーションファイル
*/

INCLUDE("target_timer.cfg");
INCLUDE("syssvc/syslog.cfg");
INCLUDE("syssvc/banner.cfg");
INCLUDE("syssvc/serial.cfg");
INCLUDE("syssvc/logtask.cfg");

INCLUDE("../mbed-lib/common/common.cfg");
INCLUDE("../mbed-lib/EthernetInterface/EthernetInterface.cfg");
INCLUDE("../mbed-lib/HttpServer_snapshot/HttpServer.cfg");
INCLUDE("../mbed-lib/FATFileSystem/ChaN/diskio.cfg");

#include "picotlsClient.h"

CRE_CYC(CYCHDR1, { TA_NULL, 0, cyclic_handler, 1000, 1 });
CRE_TSK(HTTP_MAIN_TASK, { TA_ACT, 0, ptlsClient_main, PTLS_MAIN_TASK_PRI, PTLS_MAIN_TASK_STACK_SIZE, NULL });
DEF_KMM({ KMM_SIZE, NULL });
Loading