PKCS#12 is an extremely flexible format, so any answer to your question is relative to what the archive producer decided to do: which algorithms, which parameters...
Normally, when doing password-based encryption, you will end up with 3DES or AES, and the key derivation algorithm is PBKDF2 with a cost parameter that you do not get to choose. To make the story short, this will be as safe as these things can be IF (and that's a big "if") the used password is strong.
For a specialized use case, you can generate the "password" as an actual big key: take your favourite cryptographically secure PRNG (e.g. /dev/urandom
on Linux and MacOS X) and use it to produce a sequence of 24 random hexadecimal digits. This will offer 96 bits of entropy, and things will be fine. The confidentiality of the private key in the PKCS#12 file will be maintained, and the integrity will be reliably verified.
A simple way to generate such a random "password" on a Linux system is:
(dd if=/dev/urandom bs=16 count=1 2>/dev/null) | sha1sum | cut -b 1-24
On Windows you can use PowerShell:
$rng = New-Object System.Security.Cryptography.RNGCryptoServiceProvider
$buf = New-Object byte[] 12
$rng.GetBytes($buf)
([System.BitConverter]::ToString($buf) -replace "-", "").ToLowerInvariant()
If you really want to add an extra layer, the reasonable way is not to assemble a symmetric encryption algorithm and a MAC yourself: these things are deceptively hard, meaning that it is easy to make something which works, much harder to make something which is strong, and very much harder to make something that can be ascertained to be strong. Instead, use an existing protocol which is supported by an existing, well-vetted implementation. I suggest GnuPG (the OpenPGP format implemented by GnuPG supports both symmetric and asymmetric encryption).