[PATCH v3 4/5] ncrypt: Implement NCryptCreatePersistedKey.
Santino Mazza
mazzasantino1206 at gmail.com
Wed Mar 9 19:43:38 CST 2022
El mar, 8 mar 2022 a la(s) 07:16, Hans Leidekker (hans at codeweavers.com)
escribió:
> > +SECURITY_STATUS WINAPI NCryptCreatePersistedKey(NCRYPT_PROV_HANDLE
> provider, NCRYPT_KEY_HANDLE *key,
> > + const WCHAR *algid,
> const WCHAR *name, DWORD keyspec, DWORD flags)
> > +{
> > + struct object *key_object;
> > + TRACE("(%#Ix, %p, %s, %s, %#lx, %#lx)\n", provider, key,
> wine_dbgstr_w(algid),
> > + wine_dbgstr_w(name), keyspec, flags);
> > +
> > + if (!provider) return NTE_INVALID_HANDLE;
> > + if (!algid) return HRESULT_FROM_WIN32(RPC_X_NULL_REF_POINTER);
> > + if (name) FIXME("Persistant keys not supported\n");
> > +
> > + if (!(key_object = allocate_object(KEY)))
> > + {
> > + ERR("Error allocating memory\n");
> > + return NTE_NO_MEMORY;
> > + }
> > +
> > + if (!lstrcmpiW(algid, BCRYPT_RSA_ALGORITHM))
> > + {
> > + NTSTATUS ret =
> BCryptOpenAlgorithmProvider(&key_object->key.alg_prov,
> BCRYPT_RSA_ALGORITHM, NULL, 0);
> > + DWORD default_bitlength = 1024;
>
> This could use a test to confirm that 1024 is the default.
This is already tested at dlls/ncrypt/tests/ncrypt.c:292
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220309/cf4e82d2/attachment.htm>
More information about the wine-devel
mailing list