Skip to content

Commit

Permalink
Add command for importing objects into a PKCS#11 token
Browse files Browse the repository at this point in the history
Signed-off-by: Zoltan Fridrich <[email protected]>
  • Loading branch information
ZoltanFridrich committed Oct 17, 2023
1 parent e5f0be3 commit 79090fd
Show file tree
Hide file tree
Showing 8 changed files with 597 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bash-completion/p11-kit
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _p11-kit()
COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
return
elif [[ $cword -eq 1 ]]; then
local commands='list-mechanisms generate-keypair export-object delete-object list-objects add-profile delete-profile list-profiles list-modules list-tokens print-config extract server remote'
local commands='import-object list-mechanisms generate-keypair export-object delete-object list-objects add-profile delete-profile list-profiles list-modules list-tokens print-config extract server remote'
COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
fi
} &&
Expand Down
2 changes: 2 additions & 0 deletions common/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ p11_mmap_open (const char *path,
void
p11_mmap_close (p11_mmap *map)
{
if (map == NULL)
return;
if (map->size)
munmap (map->data, map->size);
close (map->fd);
Expand Down
3 changes: 3 additions & 0 deletions p11-kit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ p11_kit_p11_kit_SOURCES = \
p11-kit/delete-profile.c \
p11-kit/export-object.c \
p11-kit/generate-keypair.c \
p11-kit/import-object.c \
p11-kit/list-objects.c \
p11-kit/list-profiles.c \
p11-kit/list-mechanisms.c \
Expand Down Expand Up @@ -431,6 +432,7 @@ sh_tests += \
if WITH_ASN1
sh_tests += \
p11-kit/test-export-public.sh \
p11-kit/test-import-public.sh \
p11-kit/test-profiles.sh \
$(NULL)
endif
Expand Down Expand Up @@ -632,6 +634,7 @@ EXTRA_DIST += \
p11-kit/test-server.sh \
p11-kit/test-list-tokens.sh \
p11-kit/test-export-public.sh \
p11-kit/test-import-public.sh \
p11-kit/test-list-mechanisms.sh \
p11-kit/test-generate-keypair.sh \
$(NULL)
Loading

0 comments on commit 79090fd

Please sign in to comment.