Bug 1462297 - Import of PKCS#12 files with Camellia encryption is not supported
Import of PKCS#12 files with Camellia encryption is not supported
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss (Show other bugs)
7.4
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: nss-nspr-maint
BaseOS QE Security Team
:
Depends On:
Blocks: rhel7-nss-pkcs12
  Show dependency treegraph
 
Reported: 2017-06-16 12:06 EDT by Hubert Kario
Modified: 2017-09-18 14:02 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Mozilla Foundation 1373716 None None None 2017-06-16 12:09 EDT

  None (edit)
Description Hubert Kario 2017-06-16 12:06:28 EDT
Description of problem:
PKCS#12 files encrypted using camellia-128-cbc, camellia-192-cbc or camellia-256-cbc algorithms are unsupported by pk12util

Version-Release number of selected component (if applicable):
nss-3.28.4-8.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. openssl req -x509 -newkey rsa -keyout localhost.key -out localhost.crt -subj /CN=localhost -nodes -batch
2. echo "RedHatEnterpriseLinux7.1" | openssl pkcs12 -export -out bundle.p12 -in localhost.crt -caname server-cert -nokeys -passout stdin -certpbe camellia-128-cbc -keypbe camellia-128-cbc
3. pk12util -l bundle.p12 -W RedHatEnterpriseLinux7.1 -v


Actual results:
pk12util: PKCS12 decode not verified: SEC_ERROR_BAD_DER: security library: improperly formatted DER-encoded message.
pk12util: PKCS12 decode not verified: SEC_ERROR_BAD_DER: security library: improperly formatted DER-encoded message.

Expected results:
Contents of the PKCS#12 file listed

Additional info:
Import of the PKCS#12 file to the NSS database does not work either.
Comment 2 Hubert Kario 2017-09-15 13:18:19 EDT
When certificates are encrypted with 40 bit RC2 and key is encrypted with camellia-256-cbc, using NSS 3.32, the file is importable:

echo "RedHatEnterpriseLinux7.1" | openssl pkcs12 -export -out bundle.p12 -in localhost.crt -inkey localhost.key -caname server-cert -passout stdin -keypbe camellia-256-cbc

mkdir nssdb
certutil -N --empty-password -d sql:nssdb
pk12util -i bundle.p12 -d sql:nssdb -W RedHatEnterpriseLinux7.1 -v
PKCS12 IMPORT SUCCESSFUL

camellia-128-cbc and camellia-192-cbc exported by NSS are "obviously" wrong - specify 32 byte key in PBKDF2, so the likely issue is with just the formatting of the file, not PBES2 or PBKDF2

Note You need to log in before you can comment on or make changes to this bug.