xca unusable pfx export for android / macos

Bug #1995095 reported by Tom Weber
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xca (Ubuntu)
Triaged
Low
Unassigned

Bug Description

pfx files exported from xca fail to import on Android (invalid password) or MacOS

this is related to new defaults of openssl 3 and has been reported to upstream already:

https://github.com/chris2511/xca/issues/360

there's also a fix in a Pull request upstream:

https://github.com/chris2511/xca/pull/389

attached is a patch against xca-2.4.0-2 package created from this pull request which works for me.

Regards,
  Tom

Tags: patch
Revision history for this message
Tom Weber (tomx) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "pkcs12-encryption-algorihtm-settings.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Thomas Ward (teward) wrote :

The issue you linked and the PR dont seem to address the same thing; this is something Upstream needs to address first, I believe, before we add code and new features to XCA via SRU or otherwise.

Changed in xca (Ubuntu):
importance: Undecided → Medium
status: New → In Progress
status: In Progress → Triaged
importance: Medium → Low
Revision history for this message
Tom Weber (tomx) wrote :

The PR gives you the option to select the encryption method for exporting password protected pfx.

Default for password protected pfx with openssl3 is AES_256_CBC - which your xca package on 22.04 produces and which fail to import on Android, MacOS and Windows.

The xca package on 20.04 uses openssl 1.x which defaults to 3DES_CBC - which can be imported on Android, MacOS and Windows.

see the -legacy Option of the current openssl-pkcs12 manpage.
Or this Thread:
https://stackoverflow.com/questions/69343254/the-password-you-entered-is-incorrect-when-importing-pfx-files-to-windows-cer
which sums it up quite nice.

This PR gives a configuration option to switch this.
I see your point in not adding options that really should be added upstream.

BUT

- I don't see reaction upstream - and i don't know if upstream is supposed to be build/tested against openssl3 (because there are openssl3 specific patches in the current .deb package).

- xca on 22.04 is broken (at least for me) as it is because I can't export anymore - which worked fine on 20.04

the patch was meant to offer just one way out of this dilemma :)

As this bug effectively breaks functionality (we ran into it by deploying a bunch of non importable client-side .pfx to android users which all failed to import) I wouldn't rate it's importance "Low"

Revision history for this message
Thomas Ward (teward) wrote : Re: [Bug 1995095] Re: xca unusable pfx export for android / macos

Note that even this PR wont' work - the core OpenSSL needs to be enabled
with Legacy upstream - see https://github.com/chris2511/xca/issues/383
for that one.  Even if this were 'enabled' with the upstream
configuration tool, OpenSSL 'legacy' options are not enabled in XCA in
22.04+ or Debian upstream.

As a result, 383 needs handled first even for newer versions to work
properly.

Again, because this is major under the hood changes in XCA, I'm hesitant
to immediately import this as is until Upstream's taken a look - their
last commit was Sept. 7 so I'm not *too* worried about bitrot because I
know the upstream maintainer has a ton of things they work on.

Thomas

On 10/28/22 12:25, Tom Weber wrote:
> The PR gives you the option to select the encryption method for
> exporting password protected pfx.
>
> Default for password protected pfx with openssl3 is AES_256_CBC - which
> your xca package on 22.04 produces and which fail to import on Android,
> MacOS and Windows.
>
> The xca package on 20.04 uses openssl 1.x which defaults to 3DES_CBC -
> which can be imported on Android, MacOS and Windows.
>
> see the -legacy Option of the current openssl-pkcs12 manpage.
> Or this Thread:
> https://stackoverflow.com/questions/69343254/the-password-you-entered-is-incorrect-when-importing-pfx-files-to-windows-cer
> which sums it up quite nice.
>
> This PR gives a configuration option to switch this.
> I see your point in not adding options that really should be added upstream.
>
> BUT
>
> - I don't see reaction upstream - and i don't know if upstream is
> supposed to be build/tested against openssl3 (because there are openssl3
> specific patches in the current .deb package).
>
> - xca on 22.04 is broken (at least for me) as it is because I can't
> export anymore - which worked fine on 20.04
>
> the patch was meant to offer just one way out of this dilemma :)
>
> As this bug effectively breaks functionality (we ran into it by
> deploying a bunch of non importable client-side .pfx to android users
> which all failed to import) I wouldn't rate it's importance "Low"
>

Revision history for this message
Tom Weber (tomx) wrote :

maybe I made a mistake by including too much technical details and a patch to demonstrate where the problem is.

The main point about this bug report is:
xca 2.4 on 22.04(LTS) fails to export usable .pfx files for a majority of devices. And it fails to do so in a very unobvious way ("wrong password entered" when trying to import these .pfx on some devices)

xca 2.2 on 20.04(LTS) does not show this behaviour.

The purpose of xca is certificate management - which is quite impossible without exporting them.

So this is a serious showstopper when upgrading - not a nice to have wishlist thing.
Certificates have an expiration date and must be renewed and deployed by that deadline which simply is impossible on 22.04 / xca 2.4 right now (and worked on LTS before)

technically i'm completely with your reasoning - though it won't help people who upgraded LTS and need to renew and deploy certificates.

Importance Low doesn't seem to fit for me.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.