Skip to content

Socket周りのリファクタリング#310

Merged
sayurin merged 21 commits intomasterfrom
socket-context
Sep 4, 2021
Merged

Socket周りのリファクタリング#310
sayurin merged 21 commits intomasterfrom
socket-context

Conversation

@sayurin
Copy link
Copy Markdown
Member

@sayurin sayurin commented Sep 4, 2021

既存のコードでは生のSOCKETハンドルを扱っているため、処理の構造化も困難となっていた。ソケットオブジェクトを導入し必要な状態を保持することでリファクタリングを行う。
例えば、ソケットの接続先サーバー名を保持する。これにより、Control connectionからData connectionに対して接続先サーバー名を引き継げ、SSLの証明書処理を確実に行えるようになる。

次いで、TLS v1.3対応を行う。具体的にはDecryptMessage()が返すSEC_I_RENEGOTIATEが処理できていなかった。理由は簡単で、ソケットの状態を保持できていなかったから。

@sayurin sayurin self-assigned this Sep 4, 2021
@sayurin
Copy link
Copy Markdown
Member Author

sayurin commented Sep 4, 2021

#279 に一部対応する。しかし、FTPサーバー側がセッション再利用を要求した場合に、接続に失敗する。Schannelの処理を追っているが現状では解決策が見つかっておらず、制限となる。

@sayurin sayurin merged commit d516b1b into master Sep 4, 2021
@sayurin sayurin deleted the socket-context branch September 4, 2021 09:58
@sayurin sayurin linked an issue Sep 4, 2021 that may be closed by this pull request
@sayurin sayurin added this to the v5.3 milestone Sep 4, 2021
@sayurin sayurin linked an issue Oct 3, 2021 that may be closed by this pull request
hwtnb pushed a commit to HaijinW/ffftp that referenced this pull request Oct 31, 2022
Socket周りのリファクタリング
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Socket Context Objectを導入する No more async regist space エラー

1 participant