MCPcopy Create free account
hub / github.com/apache/trafficserver / setup_data_ctx

Method setup_data_ctx

plugins/certifier/certifier.cc:176–189  ·  view source on GitHub ↗

Setup ssldata 1) ctx 2) cert 3) swapping queue Ownership of unique pointers are transferred into this function Then if the entry is found, the ownership is further transferred to the entry if not, the objects are destroyed here. (As per design, this is caused by LRU management deleting oldest entry)

Source from the content-addressed store, hash-verified

174 // Then if the entry is found, the ownership is further transferred to the entry
175 // if not, the objects are destroyed here. (As per design, this is caused by LRU management deleting oldest entry)
176 void
177 setup_data_ctx(const std::string &commonName, std::queue<void *> &localQ, std::unique_ptr<SSL_CTX> ctx,
178 std::unique_ptr<X509> cert, const bool &wontdo)
179 {
180 TSMutexLock(list_mutex);
181 auto iter = cnDataMap.find(commonName);
182 if (iter != cnDataMap.end()) {
183 std::swap(localQ, iter->second->vconnQ);
184 iter->second->ctx = std::move(ctx);
185 iter->second->cert = std::move(cert); ///< We might not need cert, can be easily removed
186 iter->second->wontdo = wontdo;
187 }
188 TSMutexUnlock(list_mutex);
189 }
190
191 // Prepend to the LRU list
192 void

Callers 1

shadow_cert_generatorFunction · 0.80

Calls 5

TSMutexLockFunction · 0.85
swapFunction · 0.85
TSMutexUnlockFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected