11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#import "tlskey.h"
int
of_tlskey_new(of_tlskey_t *key)
{
*key = TlsAlloc();
if (*key == TLS_OUT_OF_INDEXES)
return EAGAIN;
return 0;
}
int
of_tlskey_free(of_tlskey_t key)
{
return (TlsFree(key) ? 0 : EINVAL);
}
|
|
|
|
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#import "OFTLSKey.h"
int
OFTLSKeyNew(OFTLSKey *key)
{
*key = TlsAlloc();
if (*key == TLS_OUT_OF_INDEXES)
return EAGAIN;
return 0;
}
int
OFTLSKeyFree(OFTLSKey key)
{
return (TlsFree(key) ? 0 : EINVAL);
}
|