Skip to content
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

throw exception #88

Open
hply opened this issue Mar 29, 2023 · 1 comment
Open

throw exception #88

hply opened this issue Mar 29, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@hply
Copy link

hply commented Mar 29, 2023

Unhandled exception:
Invalid argument(s): unsupported algorithm
#0 Pkcs12Utils._algorithmFromOi (package:basic_utils/src/pkcs12_utils.dart:764:9)
#1 Pkcs12Utils.parsePkcs12. (package:basic_utils/src/pkcs12_utils.dart:694:45)
#2 List.forEach (dart:core-patch/growable_array.dart:416:8)
#3 Pkcs12Utils.parsePkcs12 (package:basic_utils/src/pkcs12_utils.dart:672:35)

debug the '_algorithmFromOi',print my pkcs12's keyPbe=1.2.840.113549.1.5.13.

test file: https://github.com/hply/file/blob/main/keystore.p12
password: pkcs12_test

@Ephenodrom
Copy link
Owner

The .p12 file uses aes256-CBC to encrypt the keys and the certs. This is currently not supported by this package, but it AES support is on the list.

If you check out the code doc for the generatePkcs12() you can see the supported algorithms.

  /// Possible values for keyPbe and certPbe:
  /// * PBE-SHA1-RC4-128
  /// * PBE-SHA1-RC4-40
  /// * PBE-SHA1-3DES ( default for keyPbe )
  /// * PBE-SHA1-2DES
  /// * PBE-SHA1-RC2-128
  /// * PBE-SHA1-RC2-40 ( default for certPbe)

The parsePkcs12() method is still BETA, so thats why there is no code doc.

The issue will stay opened until AES is supported.

@Ephenodrom Ephenodrom added the enhancement New feature or request label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants