]> git.ipfire.org Git - thirdparty/openssl.git/blob - providers/implementations/include/prov/macsignature.h
Extend the provider MAC bridge for CMAC
[thirdparty/openssl.git] / providers / implementations / include / prov / macsignature.h
1 /*
2 * Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
8 */
9
10 #include <stdlib.h>
11 #include <openssl/crypto.h>
12 #include "internal/refcount.h"
13
14 struct mac_key_st {
15 CRYPTO_RWLOCK *lock;
16 OPENSSL_CTX *libctx;
17 CRYPTO_REF_COUNT refcnt;
18 unsigned char *priv_key;
19 size_t priv_key_len;
20 char *cipher_name;
21 char *engine_name;
22 int cmac;
23 };
24
25 typedef struct mac_key_st MAC_KEY;
26
27 MAC_KEY *mac_key_new(OPENSSL_CTX *libctx, int cmac);
28 void mac_key_free(MAC_KEY *mackey);
29 int mac_key_up_ref(MAC_KEY *mackey);