-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PKCS#12 mobileconfig installation errors when using openssl version > 3 (trailofbits#14558) #14622
base: master
Are you sure you want to change the base?
Fix PKCS#12 mobileconfig installation errors when using openssl version > 3 (trailofbits#14558) #14622
Conversation
…ith shell script instead. This may not work in Windows (trailofbits#14558)
…d pipefile option in the shell command for getting openssl version number (trailofbits#14558)
there are some unnecessary changes made to |
The changes don't work for me |
Fix PKCS#12 mobileconfig installation errors when using openssl version > 3 (trailofbits#14558) trailofbits#14622 https://github.com/trailofbits/algo/pull/14622/files
Fix PKCS#12 mobileconfig installation errors when using openssl version > 3 (trailofbits#14558) trailofbits#14622 https://github.com/trailofbits/algo/pull/14622/files
|
||
- name: Get OpenSSL version | ||
shell: | | ||
set -o pipefail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running cloud-init
(Ubuntu 22.04 LTS x64 on Vultr), I got an error because set -o pipefail
fails on /bin/sh
Fixed by specifying which shell to run:
# (...)
shell: |
set -o pipefail
{{ openssl_bin }} version |
cut -f 2 -d ' '
args:
executable: bash
# (...)
With this change, everything is working for me :)
Thanks everyone (for fixing this issue and keeping this very nice project). Happy new year for all!
Check the openssl version and add -legacy flag for newer versions when working with pkcs#12 files. Original fix by https://github.com/omgagg/algo/tree/custom was updated to use a shell script to get the version. This fixes #14558
Description
In
roles/strongswan/tasks/openssl.yml
, get the version of openssl, set as a fact. In subsequent openssl tasks related to the pkcs#12 certs, if the version > 3, then add the -legacy flag, as described in [https://www.openssl.org/docs/man3.0/man1/openssl-pkcs12.html](the OpenSSL documentation).Motivation and Context
Per #14558, with newer versions of OpenSSL, the mobileconfig files created could not be installed on MacOS or iOS devices (untested on Android or Windows), with the process faling with an authentication error. By addeing the -legacy flag to the OpenSSL commands, the certs can be installed.
How Has This Been Tested?
Changes have only been manually tested when running algo in a docker instance, and only when building to EC2 targets.
Due to a lack of resources, I can't easily test in other situations.
docker build . -name custom/algo:latest
docs/deploy-from-docker.md
ipsec/apple/laptop.mobileconfig
file to MacOS (double-click)ipsec/apple/iphone.mobileconfig
file to iPhoneipsec/apple/desktop.mobileconfig
file to iPadTypes of changes
Checklist: