summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.c
diff options
context:
space:
mode:
authorJan-Willem Blokland <Jan-Willem.Blokland@Shell.com>2023-07-14 20:15:11 (GMT)
committerGitHub <noreply@github.com>2023-07-14 20:15:11 (GMT)
commit305ac8886566968ae58ba771e0ae2ba6434ac9f0 (patch)
treef298531f43ad0d0a22ae81c4fb7f4eb2fac4bd33 /tools/lib/h5tools.c
parentf21cd485a7eea5c6ec6b5dac0ccdd2118559d969 (diff)
downloadhdf5-305ac8886566968ae58ba771e0ae2ba6434ac9f0.zip
hdf5-305ac8886566968ae58ba771e0ae2ba6434ac9f0.tar.gz
hdf5-305ac8886566968ae58ba771e0ae2ba6434ac9f0.tar.bz2
ROS3: (feature) Temporary security credentials (#3030)
- Implemented support for AWS temporary security credentials. For this kind of credentials also a session/security token should be included in the request by adding the x-amz-security-token header. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/lib/h5tools.c')
-rw-r--r--tools/lib/h5tools.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 5beffa4..76f3839 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -565,8 +565,12 @@ h5tools_set_fapl_vfd(hid_t fapl_id, h5tools_vfd_info_t *vfd_info)
#ifdef H5_HAVE_ROS3_VFD
if (!vfd_info->info)
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD info is invalid");
- if (H5Pset_fapl_ros3(fapl_id, (const H5FD_ros3_fapl_t *)vfd_info->info) < 0)
+ if (H5Pset_fapl_ros3(fapl_id, &((const H5FD_ros3_fapl_ext_t *)vfd_info->info)->fa) < 0)
H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3() failed");
+
+ if (H5Pset_fapl_ros3_token(fapl_id, ((const H5FD_ros3_fapl_ext_t *)vfd_info->info)->token) <
+ 0)
+ H5TOOLS_GOTO_ERROR(FAIL, "H5Pset_fapl_ros3_token() failed");
#else
H5TOOLS_GOTO_ERROR(FAIL, "Read-only S3 VFD is not enabled");
#endif