xref: /openbmc/qemu/include/crypto/secret_keyring.h (revision 1c8eef0227e2942264063f22f10a06b84e0d3fa9)
154e7aac0SAlexey Krasikov /*
254e7aac0SAlexey Krasikov  * QEMU crypto secret support
354e7aac0SAlexey Krasikov  *
454e7aac0SAlexey Krasikov  * Copyright 2020 Yandex N.V.
554e7aac0SAlexey Krasikov  *
654e7aac0SAlexey Krasikov  * This library is free software; you can redistribute it and/or
754e7aac0SAlexey Krasikov  * modify it under the terms of the GNU Lesser General Public
854e7aac0SAlexey Krasikov  * License as published by the Free Software Foundation; either
954e7aac0SAlexey Krasikov  * version 2.1 of the License, or (at your option) any later version.
1054e7aac0SAlexey Krasikov  *
1154e7aac0SAlexey Krasikov  * This library is distributed in the hope that it will be useful,
1254e7aac0SAlexey Krasikov  * but WITHOUT ANY WARRANTY; without even the implied warranty of
1354e7aac0SAlexey Krasikov  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1454e7aac0SAlexey Krasikov  * Lesser General Public License for more details.
1554e7aac0SAlexey Krasikov  *
1654e7aac0SAlexey Krasikov  * You should have received a copy of the GNU Lesser General Public
1754e7aac0SAlexey Krasikov  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
1854e7aac0SAlexey Krasikov  *
1954e7aac0SAlexey Krasikov  */
2054e7aac0SAlexey Krasikov 
2154e7aac0SAlexey Krasikov #ifndef QCRYPTO_SECRET_KEYRING_H
2254e7aac0SAlexey Krasikov #define QCRYPTO_SECRET_KEYRING_H
2354e7aac0SAlexey Krasikov 
2454e7aac0SAlexey Krasikov #include "qapi/qapi-types-crypto.h"
2554e7aac0SAlexey Krasikov #include "qom/object.h"
2654e7aac0SAlexey Krasikov #include "crypto/secret_common.h"
2754e7aac0SAlexey Krasikov 
2854e7aac0SAlexey Krasikov #define TYPE_QCRYPTO_SECRET_KEYRING "secret_keyring"
2954e7aac0SAlexey Krasikov #define QCRYPTO_SECRET_KEYRING(obj) \
3054e7aac0SAlexey Krasikov     OBJECT_CHECK(QCryptoSecretKeyring, (obj), \
3154e7aac0SAlexey Krasikov                  TYPE_QCRYPTO_SECRET_KEYRING)
3254e7aac0SAlexey Krasikov #define QCRYPTO_SECRET_KEYRING_CLASS(class) \
3354e7aac0SAlexey Krasikov     OBJECT_CLASS_CHECK(QCryptoSecretKeyringClass, \
3454e7aac0SAlexey Krasikov                        (class), TYPE_QCRYPTO_SECRET_KEYRING)
3554e7aac0SAlexey Krasikov #define QCRYPTO_SECRET_KEYRING_GET_CLASS(class) \
3654e7aac0SAlexey Krasikov     OBJECT_GET_CLASS(QCryptoSecretKeyringClass, \
3754e7aac0SAlexey Krasikov                      (class), TYPE_QCRYPTO_SECRET_KEYRING)
3854e7aac0SAlexey Krasikov 
3954e7aac0SAlexey Krasikov typedef struct QCryptoSecretKeyring QCryptoSecretKeyring;
4054e7aac0SAlexey Krasikov typedef struct QCryptoSecretKeyringClass QCryptoSecretKeyringClass;
4154e7aac0SAlexey Krasikov 
42*1c8eef02SEduardo Habkost struct QCryptoSecretKeyring {
4354e7aac0SAlexey Krasikov     QCryptoSecretCommon parent;
4454e7aac0SAlexey Krasikov     int32_t serial;
45*1c8eef02SEduardo Habkost };
4654e7aac0SAlexey Krasikov 
4754e7aac0SAlexey Krasikov 
48*1c8eef02SEduardo Habkost struct QCryptoSecretKeyringClass {
4954e7aac0SAlexey Krasikov     QCryptoSecretCommonClass parent;
50*1c8eef02SEduardo Habkost };
5154e7aac0SAlexey Krasikov 
5254e7aac0SAlexey Krasikov #endif /* QCRYPTO_SECRET_KEYRING_H */
53