summaryrefslogtreecommitdiffstats
path: root/providers/implementations/encode_decode
diff options
context:
space:
mode:
Diffstat (limited to 'providers/implementations/encode_decode')
-rw-r--r--providers/implementations/encode_decode/decode_der2key.c6
-rw-r--r--providers/implementations/encode_decode/decode_msblob2key.c6
-rw-r--r--providers/implementations/encode_decode/decode_pvk2key.c6
3 files changed, 15 insertions, 3 deletions
diff --git a/providers/implementations/encode_decode/decode_der2key.c b/providers/implementations/encode_decode/decode_der2key.c
index 2657760a62..5f094a32dc 100644
--- a/providers/implementations/encode_decode/decode_der2key.c
+++ b/providers/implementations/encode_decode/decode_der2key.c
@@ -317,10 +317,14 @@ static int der2key_export_object(void *vctx,
void *keydata;
if (reference_sz == sizeof(keydata) && export != NULL) {
+ int selection = ctx->selection;
+
+ if (selection == 0)
+ selection = OSSL_KEYMGMT_SELECT_ALL;
/* The contents of the reference is the address to our object */
keydata = *(void **)reference;
- return export(keydata, ctx->selection, export_cb, export_cbarg);
+ return export(keydata, selection, export_cb, export_cbarg);
}
return 0;
}
diff --git a/providers/implementations/encode_decode/decode_msblob2key.c b/providers/implementations/encode_decode/decode_msblob2key.c
index 3bf4cf4537..7c4f993b89 100644
--- a/providers/implementations/encode_decode/decode_msblob2key.c
+++ b/providers/implementations/encode_decode/decode_msblob2key.c
@@ -221,10 +221,14 @@ msblob2key_export_object(void *vctx,
void *keydata;
if (reference_sz == sizeof(keydata) && export != NULL) {
+ int selection = ctx->selection;
+
+ if (selection == 0)
+ selection = OSSL_KEYMGMT_SELECT_ALL;
/* The contents of the reference is the address to our object */
keydata = *(void **)reference;
- return export(keydata, ctx->selection, export_cb, export_cbarg);
+ return export(keydata, selection, export_cb, export_cbarg);
}
return 0;
}
diff --git a/providers/implementations/encode_decode/decode_pvk2key.c b/providers/implementations/encode_decode/decode_pvk2key.c
index 819014231c..cae1d9897a 100644
--- a/providers/implementations/encode_decode/decode_pvk2key.c
+++ b/providers/implementations/encode_decode/decode_pvk2key.c
@@ -190,10 +190,14 @@ static int pvk2key_export_object(void *vctx,
void *keydata;
if (reference_sz == sizeof(keydata) && export != NULL) {
+ int selection = ctx->selection;
+
+ if (selection == 0)
+ selection = OSSL_KEYMGMT_SELECT_ALL;
/* The contents of the reference is the address to our object */
keydata = *(void **)reference;
- return export(keydata, ctx->selection, export_cb, export_cbarg);
+ return export(keydata, selection, export_cb, export_cbarg);
}
return 0;
}