MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / SSL_GetError

Function SSL_GetError

src/SSL.c:207–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207static CC_NOINLINE cc_result SSL_GetError(SSLContext* ctx) {
208 int err;
209 if (ctx->writeError) return ctx->writeError;
210 if (ctx->readError) return ctx->readError;
211
212 // TODO session resumption, proper connection closing ??
213 err = br_ssl_engine_last_error(&ctx->sc.eng);
214 if (err == 0 && br_ssl_engine_current_state(&ctx->sc.eng) == BR_SSL_CLOSED)
215 return SSL_ERR_CONTEXT_DEAD;
216
217 return SSL_ERROR_SHIFT | (err & 0xFFFF);
218}
219
220cc_result SSL_Read(void* ctx_, cc_uint8* data, cc_uint32 count, cc_uint32* read) {
221 SSLContext* ctx = (SSLContext*)ctx_;

Callers 2

SSL_ReadFunction · 0.85
SSL_WriteAllFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected