diff --git a/lib/hx509/file.c b/lib/hx509/file.c index 39497fc3a..1152af242 100644 --- a/lib/hx509/file.c +++ b/lib/hx509/file.c @@ -34,6 +34,27 @@ #include "hx_locl.h" RCSID("$ID$"); +int +_hx509_map_file_os(const char *fn, heim_octet_string *os, struct stat *rsb) +{ + size_t length; + void *data; + int ret; + + ret = _hx509_map_file(fn, &data, &length, rsb); + + os->data = data; + os->length = length; + + return ret; +} + +void +_hx509_unmap_file_os(heim_octet_string *os) +{ + _hx509_unmap_file(os->data, os->length); +} + int _hx509_map_file(const char *fn, void **data, size_t *length, struct stat *rsb) {