Lines Matching refs:source
111 static CURLcode load_cafile(struct cafile_source *source, in load_cafile() argument
128 DEBUGASSERT(source->type == CAFILE_SOURCE_PATH in load_cafile()
129 || source->type == CAFILE_SOURCE_BLOB); in load_cafile()
131 if(source->type == CAFILE_SOURCE_PATH) { in load_cafile()
132 fp = fopen(source->data, "rb"); in load_cafile()
137 if(source->type == CAFILE_SOURCE_BLOB && source->len > (size_t)INT_MAX) in load_cafile()
147 if(source->type == CAFILE_SOURCE_PATH) { in load_cafile()
153 else if(source->type == CAFILE_SOURCE_BLOB) { in load_cafile()
154 n = source->len; in load_cafile()
155 p = (unsigned char *) source->data; in load_cafile()
249 } while(source->type != CAFILE_SOURCE_BLOB); in load_cafile()
535 struct cafile_source source; in bearssl_connect_step1() local
536 source.type = CAFILE_SOURCE_BLOB; in bearssl_connect_step1()
537 source.data = ca_info_blob->data; in bearssl_connect_step1()
538 source.len = ca_info_blob->len; in bearssl_connect_step1()
541 ret = load_cafile(&source, &backend->anchors, &backend->anchors_len); in bearssl_connect_step1()
549 struct cafile_source source; in bearssl_connect_step1() local
550 source.type = CAFILE_SOURCE_PATH; in bearssl_connect_step1()
551 source.data = ssl_cafile; in bearssl_connect_step1()
552 source.len = 0; in bearssl_connect_step1()
555 ret = load_cafile(&source, &backend->anchors, &backend->anchors_len); in bearssl_connect_step1()