ProviderMixin mixin

OpenSSL 3.x provider API (openssl/provider.h).

Since OpenSSL 3.0 the algorithms considered obsolete moved from the default provider to legacy, which is not loaded automatically. Without it, operations such as opening a .p12 encrypted with pbeWithSHA1And40BitRC2-CBC fail with a generic error (PKCS12_parse failed) that misleadingly points at the password.

final openssl = OpenSSL();
openssl.loadLegacyProvider();
final bundle = openssl.parsePkcs12(der, password: pass, legacy: true);
Superclass constraints
Mixin applications

Properties

bindings → OpenSslFfi
Acesso aos bindings brutos gerados.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
loadedProviders → Map<String, OpenSslProvider>
Providers loaded so far (unmodifiable).
no setter
loader → OpenSslBindings
Acesso ao loader/configuração (opcional, se precisarmos de caminhos).
no setterinherited
providerSearchPath → String?
Provider search directory in use, or null when it is the built-in one.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

isProviderAvailable(String name) → bool
Whether the name provider is available for use.
loadLegacyProvider({bool required = true, List<String> searchPaths = const []}) → OpenSslProvider?
Loads the kLegacyProvider keeping default active.
loadProvider(String name, {bool retainFallbacks = true, bool required = true, List<String> searchPaths = const [], bool searchModule = true}) → OpenSslProvider?
Loads a provider into the library's default context.
lookup<T extends Function>(String name) → Pointer<NativeFunction<T>>
Helper para pegar endereços de funções (para NativeFinalizer).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setProviderSearchPath(String path) → void
Sets the directory where OpenSSL looks for provider modules (legacy.dll, legacy.so, ...).
toString() → String
A string representation of this object.
inherited
unloadProvider(String name) → bool
Unloads a provider loaded by loadProvider.
unloadProviders() → void
Unloads every provider loaded through this instance.

Operators

operator ==(Object other) → bool
The equality operator.
inherited