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()
555 struct cafile_source source; in bearssl_connect_step1() local
556 source.type = CAFILE_SOURCE_BLOB; in bearssl_connect_step1()
557 source.data = ca_info_blob->data; in bearssl_connect_step1()
558 source.len = ca_info_blob->len; in bearssl_connect_step1()
561 ret = load_cafile(&source, &backend->anchors, &backend->anchors_len); in bearssl_connect_step1()
569 struct cafile_source source; in bearssl_connect_step1() local
570 source.type = CAFILE_SOURCE_PATH; in bearssl_connect_step1()
571 source.data = ssl_cafile; in bearssl_connect_step1()
572 source.len = 0; in bearssl_connect_step1()
575 ret = load_cafile(&source, &backend->anchors, &backend->anchors_len); in bearssl_connect_step1()