1Crypt::U2F::Server(3) User Contributed Perl DocumentationCrypt::U2F::Server(3)
2
3
4

NAME

6       Crypt::U2F::Server - Low level wrapper around the U2F two factor
7       authentication C library (server side)
8

SYNOPSIS

10         use Crypt::U2F::Server;
11

DESCRIPTION

13       This is a very low level wrapper around the original C library. You
14       probably shouldn't use it, but use Crypt::U2F::Server::Simple instead!
15
16       This API is subject to change, depending on the underlying library, the
17       weather and the whims of the developer.
18
19       If you decide to use it anyway, it would probably be a good idea to
20       specify the exact version number of Crypt::U2F::Server to use.
21

INSTALLATION

23       This module requires the Yubico u2f-server shared library installed,
24       please see the official project page at
25       <https://developers.yubico.com/libu2f-server/> on how to do that.
26

NO MULTITHREADING / MULTI INSTANCES

28       The way this is currently implemented, i doubt very much that
29       multithreading or even use in more than one instance in your program
30       will work. Multi-Forking should be OK, though, if you only call
31       u2fclib_init() after forking, but this isn't tested as of yet.
32
33       The problem is how u2fclib_init() and u2fclib_deInit() are implemented.
34       While the underlying library has a context-handle (not used here),
35       u2fclib_deInit() will tear down everything as far as i can tell.
36
37       Crypt::U2F::Server::Simple works around this problem by reference
38       counting and always requiring all values to call the relevant
39       u2fclib_set* functions.
40
41   EXPORT
42       None by default.
43
44   Exportable functions
45         char* u2fclib_calcRegistrationChallenge(void* ctx)
46         int u2fclib_deInit(void)
47         int u2fclib_free_context(void* ctx)
48         char* u2fclib_getError(void)
49         void* u2fclib_get_context(void)
50         int u2fclib_init(bool debug)
51         int u2fclib_setAppID(void* ctx, char* appid)
52         int u2fclib_setChallenge(void* ctx, char* challenge)
53         int u2fclib_setKeyHandle(void* ctx, char* buf)
54         int u2fclib_setOrigin(void* ctx, char* origin)
55         int u2fclib_setPublicKey(void* ctx, char* buf)
56         int u2fclib_verifyAuthentication(void* ctx, char* buf)
57         registrationData_t* u2fclib_verifyRegistration(void* ctx, char* buf)
58

SEE ALSO

60       See Crypt::U2F::Server::Simple for the module you should actually be
61       using.
62

BUGS

64       Yes, there should be some in there. First of all, this is crypto stuff,
65       so it's broken by default (it only depends on the time it takes to
66       happen).
67
68       Also, at the moment, this module has seen only very limited testing.
69

AUTHOR

71       Rene Schickbauer, <rene.schickbauer@magnapowertrain.com>
72       Xavier Guimard, <x.guimard@free.fr>
73
75       Adapted as a Perl library by Rene 'cavac' Schickbauer
76
77       This roughly based on u2f-server.c from Yubico's C library, see
78       <https://developers.yubico.com/libu2f-server/>
79
80       In order for this to work, you need to install that library.
81
82       This adaption is (C) 2014-2018 Rene 'cavac' Schickbauer and 2018 Xavier
83       Guimard, but as it is based on Yubico's code, the licence below
84       applies!
85
86       We, the community, would hereby thank Yubico for open sourcing their
87       code!
88
89           /*
90           * Copyright (c) 2014 Yubico AB
91           * All rights reserved.
92           *
93           * Redistribution and use in source and binary forms, with or without
94           * modification, are permitted provided that the following conditions are
95           * met:
96           *
97           * * Redistributions of source code must retain the above copyright
98           * notice, this list of conditions and the following disclaimer.
99           *
100           * * Redistributions in binary form must reproduce the above
101           * copyright notice, this list of conditions and the following
102           * disclaimer in the documentation and/or other materials provided
103           * with the distribution.
104           *
105           * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
106           * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
107           * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
108           * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
109           * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
110           * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
111           * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
112           * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
113           * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
114           * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
115           * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
116           */
117
118
119
120perl v5.36.1                      2023-10-04             Crypt::U2F::Server(3)
Impressum