当前位置:网站首页>SSL / bio pour OpenSSL Get FD
SSL / bio pour OpenSSL Get FD
2022-07-03 17:48:00 【Star Brother play Cloud】
Tant qu'il est utiliséOpenSSL,Il y a toujours quelque chose qui dérange les gens. Cette fois, oui.SSL_get_fd.J'ai créé unSSLObjet,Directement sur cet objetSSLDeaccept:
bio = BIO_new(BIO_s_accept()); BIO_set_accept_port(bio, "1234"); BIO_do_accept(bio); SSL_set_bio(ssl, bio, bio); SSL_accept(ssl);
Comme ça, il n'y a pas besoin de s'énerversockaddrC'est.Plus tard, j'ai pensé être avec çaSSLSous - couche associée à l'objetsocketExécution supérieuresetsockopt,J'ai pris ça pour acquisSSL_get_fd/BIO_get_fdC'est très évidentAPI.Ça s'est bien terminé.Et puis ça a mal tourné,J'ai découvertsetsockiotLe descripteur de l'opération finale estlistnenSocket,Au lieu deacceptLa prise retournée.Il semble queAPITrès raisonnable au niveau,Après toutbioLe paramètre est unBIO_s_accept,Et ce qui y est associé, c'est unlistenSocket.Pour obtenir le bonacceptLire et écriresocketDescripteur,Tu dois écrire ça:
[plain] view plaincopyprint?InCODEVoir le fragment de code ci - dessus dériver vers mon fragment de code
BIO_get_fd(BIO_next(bio), &sd);
BIO_get_fd(BIO_next(bio), &sd);Le problème, c'est que, Tu dois savoir que BIO stack Comment s'arrange - t - il pour écrire le code ci - dessus , La meilleure façon d'y arriver est de regarder OpenSSLCode source pour.
BIODeAPI Le design doit être conçu pour get/set_fdC'est ça??BIO Tu dois être avec quelqu'un. fdEst - ce pertinent??memoryTypeBIOSiget fdEt si, Est - ce qu'il y a une erreur qui va revenir ?PuisqueBIO Qui forment une superposition IO stack, Alors peut - être qu'il y a le plus bas et un UNIX fdCorrélation, Alors pourquoi ne pas retourner directement au bas ?
边栏推荐
- 小程序 多tab 多swiper + 每个tab分页
- Wechat applet for the first time
- [combinatorics] recursive equation (case where the non-homogeneous part is exponential | example where the non-homogeneous part is exponential)
- Applet with multiple tabs and Swipers + paging of each tab
- A day's work list of an ordinary programmer
- Investigation on the operation prospect of the global and Chinese Anti enkephalinase market and analysis report on the investment strategy of the 14th five year plan 2022-2028
- Implementation of Tetris in C language
- [set theory] order relation: summary (partial order relation | partial order set | comparable | strictly less than | covering | hasto | total order relation | quasi order relation | partial order rela
- [combinatorics] recursive equation (four cases where the non-homogeneous part of a linear non-homogeneous recursive equation with constant coefficients is the general solution of the combination of po
- Gear2021 monthly update - December
猜你喜欢

QT adjust win screen brightness and sound size

互联网医院HIS管理平台源码,在线问诊,预约挂号 智慧医院小程序源码

Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code

Internet Hospital his Management Platform source, online Inquiry, appointment Registration Smart Hospital Small program source
![[RT thread] NXP rt10xx device driver framework -- Audio construction and use](/img/85/32a83eaa4b7f5b30d4d7c4f4c32791.png)
[RT thread] NXP rt10xx device driver framework -- Audio construction and use

QT学习日记9——对话框

1164 Good in C

鸿蒙第四次培训

Type conversion, variable

List的stream中Long对象与long判等问题记录
随机推荐
[mathematical logic] equivalent calculus and reasoning calculus of predicate logic (individual word | predicate | quantifier | predicate logic formula | two basic formulas | proposition symbolization
Kotlin's collaboration: Context
TCP congestion control details | 3 design space
数学公式(测试)
As soon as we enter "remote", we will never regret, and several people will be happy and several people will be sad| Community essay solicitation
毕业总结
Write a program to process a list container of string type. Find a special value in the container 9.27: and delete it if found. Rewrite the above procedure with deque container.
Brief introduction to the core functions of automatic penetration testing tool
[combinatorics] recursive equation (summary of the solution process of recursive equation | homogeneous | double root | non-homogeneous | characteristic root is 1 | exponential form | the bottom is th
Internet hospital his management platform source code, online consultation, appointment registration smart hospital applet source code
Ml (machine learning) softmax function to realize the classification of simple movie categories
STM32实现74HC595控制
Records of long objects and long judgments in the stream of list
TensorBoard快速入门(Pytorch使用TensorBoard)
基于人脸识别的课堂考勤系统 tkinter+openpyxl+face_recognition
Vs2013 has blocked the installer, and ie10 needs to be installed
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
Kotlin的协程:上下文
RDS数据库的监测页面在哪看?
鸿蒙第四次培训