Home
last modified time | relevance | path

Searched refs:ssl (Results 1 – 5 of 5) sorted by relevance

/system/netd/resolv/
DDnsTlsSessionCache.cpp27 bool DnsTlsSessionCache::prepareSsl(SSL* ssl) { in prepareSsl() argument
30 int ret = SSL_set_ex_data(ssl, 0, this); in prepareSsl()
40 int DnsTlsSessionCache::newSessionCallback(SSL* ssl, SSL_SESSION* session) { in newSessionCallback() argument
41 if (!ssl || !session) { in newSessionCallback()
46 SSL_get_ex_data(ssl, 0)); in newSessionCallback()
DDnsTlsSocket.cpp187 bssl::UniquePtr<SSL> ssl(SSL_new(mSslCtx.get())); in sslConnect() local
190 SSL_set_bio(ssl.get(), bio.get(), bio.get()); in sslConnect()
193 if (!mCache->prepareSsl(ssl.get())) { in sslConnect()
198 if (SSL_set_tlsext_host_name(ssl.get(), mServer.name.c_str()) != 1) { in sslConnect()
202 X509_VERIFY_PARAM* param = SSL_get0_param(ssl.get()); in sslConnect()
208 SSL_set_verify(ssl.get(), SSL_VERIFY_PEER, nullptr); in sslConnect()
214 SSL_set_session(ssl.get(), session.get()); in sslConnect()
221 int ret = SSL_connect(ssl.get()); in sslConnect()
225 const int ssl_err = SSL_get_error(ssl.get(), ret); in sslConnect()
252 int verify_result = SSL_get_verify_result(ssl.get()); in sslConnect()
[all …]
DDnsTlsSessionCache.h37 bool prepareSsl(SSL* _Nonnull ssl);
48 static int newSessionCallback(SSL* _Nullable ssl, SSL_SESSION* _Nullable session);
/system/netd/resolv/dns_responder/
Ddns_tls_frontend.cpp300 bssl::UniquePtr<SSL> ssl(SSL_new(ctx_.get())); in requestHandler() local
301 SSL_set_fd(ssl.get(), client.get()); in requestHandler()
305 if (SSL_accept(ssl.get()) <= 0) { in requestHandler()
309 success = handleOneRequest(ssl.get()); in requestHandler()
323 bool DnsTlsFrontend::handleOneRequest(SSL* ssl) { in handleOneRequest() argument
325 if (SSL_read(ssl, &queryHeader, 2) != 2) { in handleOneRequest()
333 int ret = SSL_read(ssl, query + qbytes, qlen - qbytes); in handleOneRequest()
355 if (SSL_write(ssl, responseHeader, 2) != 2) { in handleOneRequest()
359 if (SSL_write(ssl, recv_buffer, rlen) != rlen) { in handleOneRequest()
Ddns_tls_frontend.h71 bool handleOneRequest(SSL* ssl);