php / php/php-src

Add "legacy", key and cert PBE alg options to openssl_pkcs12_export

Open
#16,797 7 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Extension: openssl Feature
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

Please consider adding support for forcing legacy mode for openssl_pkcs12_export. Currently the only workaround I know, is to switch completely to calling command line openssl pkcs12 -export directly with -legacy option, which requires enabling proc_open or other similar functions, which can pose security risk. Unfortunately many systems and applications still understands only legacy algorithms in PKCS#12 files so many are still forced to use them when creating PKCS#12 files.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the openssl_pkcs12_export implementation and its related tests in php-src, then inspect how PKCS#12 export options are passed to OpenSSL. Done means the legacy, key PBE, and certificate PBE options can be forced without invoking the command-line tool, with coverage for the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
cryptography, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.