mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-12 09:29:40 +00:00
Some KDF implementations were available before the current EVP_KDF API. They were used via EVP_PKEY_derive. There exists a bridge between the old API and the EVP_KDF API however this bridge itself uses a legacy EVP_PKEY_METHOD. This commit implements a provider side bridge without having to use any legacy code. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12573)
25 lines
672 B
C
25 lines
672 B
C
/*
|
|
* Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
|
|
*
|
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
* this file except in compliance with the License. You can obtain a copy
|
|
* in the file LICENSE in the source distribution or at
|
|
* https://www.openssl.org/source/license.html
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <openssl/crypto.h>
|
|
#include "internal/refcount.h"
|
|
|
|
struct kdf_data_st {
|
|
OPENSSL_CTX *libctx;
|
|
CRYPTO_REF_COUNT refcnt;
|
|
CRYPTO_RWLOCK *lock;
|
|
};
|
|
|
|
typedef struct kdf_data_st KDF_DATA;
|
|
|
|
KDF_DATA *kdf_data_new(void *provctx);
|
|
void kdf_data_free(KDF_DATA *kdfdata);
|
|
int kdf_data_up_ref(KDF_DATA *kdfdata);
|