当前位置:网站首页>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 ?
边栏推荐
- MinGW compile boost library
- Kubernetes resource object introduction and common commands (4)
- [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
- SQL injection database operation foundation
- Leetcode540: a single element in an ordered array
- Remote office tools sharing | community essay solicitation
- 2021 ICPC regional competition (Shanghai) g.edge groups (tree DP)
- Kotlin's collaboration: Context
- Market demand survey and marketing strategy analysis report of global and Chinese pet milk substitutes 2022-2028
- Golang unit test, mock test and benchmark test
猜你喜欢
![[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](/img/df/a034032e203e7935dafaf8a71cb6c8.jpg)
[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

Automata and automatic line of non-standard design

Ml (machine learning) softmax function to realize the classification of simple movie categories

BFS - topology sort

国内如何购买Google Colab会员

Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition

聊聊支付流程的設計與實現邏輯
![[UE4] brush Arctic pack high quality Arctic terrain pack](/img/e7/bc86bd8450b0b2bdec8980a2aa1a10.jpg)
[UE4] brush Arctic pack high quality Arctic terrain pack

Interviewer: why is the value nil not equal to nil?

Kubernetes resource object introduction and common commands (4)
随机推荐
PUT vs. POST for Uploading Files - RESTful API to be Built Using Zend Framework
Implementation of Tetris in C language
Luogu: p1155 [noip2008 improvement group] double stack sorting (bipartite graph, simulation)
Applet with multiple tabs and Swipers + paging of each tab
Kotlin的協程:上下文
Where is the database account used when running SQL tasks in data warehouse tasks configured
Ml (machine learning) softmax function to realize the classification of simple movie categories
The difference between get and post
[RT thread] construction and use of --hwtimer of NXP rt10xx device driver framework
Kubernetes resource object introduction and common commands (4)
鸿蒙第三次培训
[RT thread] NXP rt10xx device driver framework -- RTC construction and use
Life perception 1
Classroom attendance system based on face recognition tkinter+openpyxl+face_ recognition
[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
远程办公工具分享|社区征文
Online assignment 3 of mobile Internet technology in the 20th autumn of electronic technology [standard answer]
When absolutely positioned, the element is horizontally and vertically centered
Collection of the most beautiful graduation photos in the graduation season, collection of excellent graduation photos
MinGW compile boost library