Debian Codegraph @

channels/rdpewa/client/rdpewa_fido.h

raw symbols SCIP
1 /**
2 * FreeRDP: A Remote Desktop Protocol Implementation
3 * WebAuthn Virtual Channel Extension [MS-RDPEWA]
4 * libfido2 authenticator integration
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 #ifndef FREERDP_CHANNEL_RDPEWA_CLIENT_FIDO_H
20 #define FREERDP_CHANNEL_RDPEWA_CLIENT_FIDO_H
21
22 #include <winpr/wtypes.h>
23 #include <winpr/platform.h>
24 #include <winpr/stream.h>
25
26 #include <freerdp/freerdp.h>
27
28 #include "rdpewa_cbor.h"
29
30 /** @brief Handle a CTAPCBOR_RPC_COMMAND_WEB_AUTHN request (MakeCredential / GetAssertion).
31 *
32 * Talks to local authenticators via libfido2. May block waiting for user interaction.
33 *
34 * @param context RDP context for user interaction (PIN prompt)
35 * @param request decoded request message
36 * @return a new wStream on success (caller frees with Stream_Free(s, TRUE)), nullptr on failure
37 */
38 WINPR_ATTR_MALLOC(Stream_Free, 1)
39 wStream* rdpewa_fido_webauthn(rdpContext* context, const RDPEWA_REQUEST* request);
40
41 /** @brief Handle CTAPCBOR_RPC_COMMAND_IUVPAA -- check for platform authenticator.
42 *
43 * @return a new wStream on success (caller frees with Stream_Free(s, TRUE)), nullptr on failure
44 */
45 WINPR_ATTR_MALLOC(Stream_Free, 1)
46 wStream* rdpewa_fido_is_uvpaa(void);
47
48 /** @brief Handle CTAPCBOR_RPC_COMMAND_API_VERSION.
49 *
50 * @return a new wStream on success (caller frees with Stream_Free(s, TRUE)), nullptr on failure
51 */
52 WINPR_ATTR_MALLOC(Stream_Free, 1)
53 wStream* rdpewa_fido_api_version(void);
54
55 /** @brief Handle CTAPCBOR_RPC_COMMAND_GET_AUTHENTICATOR_LIST.
56 *
57 * @return a new wStream on success (caller frees with Stream_Free(s, TRUE)), nullptr on failure
58 */
59 WINPR_ATTR_MALLOC(Stream_Free, 1)
60 wStream* rdpewa_fido_get_authenticator_list(void);
61
62 /** @brief Handle CTAPCBOR_RPC_COMMAND_GET_CREDENTIALS.
63 *
64 * @param context RDP context for user interaction (PIN prompt)
65 * @param rpId relying party ID to query credentials for
66 * @return a new wStream on success (caller frees with Stream_Free(s, TRUE)), nullptr on failure
67 */
68 WINPR_ATTR_MALLOC(Stream_Free, 1)
69 wStream* rdpewa_fido_get_credentials(rdpContext* context, const char* rpId);
70
71 #endif /* FREERDP_CHANNEL_RDPEWA_CLIENT_FIDO_H */