当前位置:网站首页>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 ?
边栏推荐
- SQL injection database operation foundation
- Kubernetes resource object introduction and common commands (III)
- Talk about the design and implementation logic of payment process
- Golang单元测试、Mock测试以及基准测试
- [RT thread] NXP rt10xx device driver framework -- Audio construction and use
- What is the difference between cloud server and cloud virtual machine
- vs2013已阻止安装程序,需安装IE10
- TensorBoard快速入门(Pytorch使用TensorBoard)
- [RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
- Kotlin的協程:上下文
猜你喜欢
Research on Swift
鸿蒙第四次培训
【JokerのZYNQ7020】DDS_ Compiler。
Leetcode 108 converts an ordered array into a binary search tree -- recursive method
Select 3 fcpx plug-ins. Come and see if you like them
Applet setting multi account debugging
Discussion sur la logique de conception et de mise en oeuvre du processus de paiement
Baiwen.com 7 days Internet of things smart home learning experience punch in the next day
QT adjust win screen brightness and sound size
Cloud primordial weekly | CNCF released the 2021 cloud primordial development status report, which was released on istio 1.13
随机推荐
Leetcode 538 converts binary search tree into cumulative tree -- recursive method and iterative method
Where is the monitoring page of RDS database?
Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028
Golang unit test, mock test and benchmark test
(8) HS corner detection
聊聊支付流程的设计与实现逻辑
Inheritance of ES6 class
Type conversion, variable
Select 3 fcpx plug-ins. Come and see if you like them
Basic grammar of interview (Part 2)
Mathematical formula (test)
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
[mathematical logic] equivalent calculus and reasoning calculus of predicate logic (individual word | predicate | quantifier | predicate logic formula | two basic formulas | proposition symbolization
Getting started with deops
Notes on problems -- watching videos on edge will make the screen green
link preload prefetch
AcWing 3438. 数制转换
Online assignment 3 of mobile Internet technology in the 20th autumn of electronic technology [standard answer]
Kotlin的协程:上下文
1146_ SiCp learning notes_ exponentiation