1

I have written a shell script that creates an encrypted sparsebundle disk image. I want to add a pubkey to the sparsebundle, but the option -pubkey (which is documented by Apple) is getting rejected when I add it to the shell script, or even when I just run a single line command in bash.

Am I missing something about this option? I read the documentation, but I still can't get it to work.

Currently the "create" line of the shell script looks like this (the script works fine as is, but when I add -pubkey it gives me a "usage" return):

echo $password | hdiutil create -size $space -encryption -type SPARSEBUNDLE -fs HFS+J $name
Cœur
  • 37,241
  • 25
  • 195
  • 267
sofly
  • 233
  • 7
  • 12
  • After posting this in a few places and getting a bit of feedback, it appears as though the -pubkey option has never worked. I am going to wait to see if it works in Lion. If it doesn't, then it's time to report a bug. – sofly Jun 12 '11 at 18:05

1 Answers1

0

This is often cited as 'never working' or broken, but it can work & has done so for quite some time.

See below for an example, in short you just need to use Keychain Access to create a certificate for the public/private keys.

https://web.archive.org/web/20170106035834/http://design.caltech.edu/erik/Misc/encrypted_virtual_disk.html

Florian Bender
  • 161
  • 2
  • 4
Guest
  • 1