godot/modules/mbedtls/crypto_mbedtls.cpp

/**************************************************************************/
/*  crypto_mbedtls.cpp                                                    */
/**************************************************************************/
/*                         This file is part of:                          */
/*                             GODOT ENGINE                               */
/*                        https://godotengine.org                         */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */
/*                                                                        */
/* Permission is hereby granted, free of charge, to any person obtaining  */
/* a copy of this software and associated documentation files (the        */
/* "Software"), to deal in the Software without restriction, including    */
/* without limitation the rights to use, copy, modify, merge, publish,    */
/* distribute, sublicense, and/or sell copies of the Software, and to     */
/* permit persons to whom the Software is furnished to do so, subject to  */
/* the following conditions:                                              */
/*                                                                        */
/* The above copyright notice and this permission notice shall be         */
/* included in all copies or substantial portions of the Software.        */
/*                                                                        */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */
/**************************************************************************/

#include "crypto_mbedtls.h"

#include "core/config/engine.h"
#include "core/config/project_settings.h"
#include "core/io/certs_compressed.gen.h"
#include "core/io/compression.h"
#include "core/io/file_access.h"
#include "core/os/os.h"

#ifdef TOOLS_ENABLED
#include "editor/editor_settings.h"
#endif

#include <mbedtls/debug.h>
#include <mbedtls/md.h>
#include <mbedtls/pem.h>

#define PEM_BEGIN_CRT
#define PEM_END_CRT
#define PEM_MIN_SIZE

CryptoKey *CryptoKeyMbedTLS::create(bool p_notify_postinitialize) {}

Error CryptoKeyMbedTLS::load(const String &p_path, bool p_public_only) {}

Error CryptoKeyMbedTLS::save(const String &p_path, bool p_public_only) {}

Error CryptoKeyMbedTLS::load_from_string(const String &p_string_key, bool p_public_only) {}

String CryptoKeyMbedTLS::save_to_string(bool p_public_only) {}

int CryptoKeyMbedTLS::_parse_key(const uint8_t *p_buf, int p_size) {}

X509Certificate *X509CertificateMbedTLS::create(bool p_notify_postinitialize) {}

Error X509CertificateMbedTLS::load(const String &p_path) {}

Error X509CertificateMbedTLS::load_from_memory(const uint8_t *p_buffer, int p_len) {}

Error X509CertificateMbedTLS::save(const String &p_path) {}

String X509CertificateMbedTLS::save_to_string() {}

Error X509CertificateMbedTLS::load_from_string(const String &p_string_key) {}

bool HMACContextMbedTLS::is_md_type_allowed(mbedtls_md_type_t p_md_type) {}

HMACContext *HMACContextMbedTLS::create(bool p_notify_postinitialize) {}

Error HMACContextMbedTLS::start(HashingContext::HashType p_hash_type, const PackedByteArray &p_key) {}

Error HMACContextMbedTLS::update(const PackedByteArray &p_data) {}

PackedByteArray HMACContextMbedTLS::finish() {}

HMACContextMbedTLS::~HMACContextMbedTLS() {}

Crypto *CryptoMbedTLS::create(bool p_notify_postinitialize) {}

void CryptoMbedTLS::initialize_crypto() {}

void CryptoMbedTLS::finalize_crypto() {}

CryptoMbedTLS::CryptoMbedTLS() {}

CryptoMbedTLS::~CryptoMbedTLS() {}

X509CertificateMbedTLS *CryptoMbedTLS::default_certs =;

X509CertificateMbedTLS *CryptoMbedTLS::get_default_certificates() {}

void CryptoMbedTLS::load_default_certificates(const String &p_path) {}

Ref<CryptoKey> CryptoMbedTLS::generate_rsa(int p_bytes) {}

Ref<X509Certificate> CryptoMbedTLS::generate_self_signed_certificate(Ref<CryptoKey> p_key, const String &p_issuer_name, const String &p_not_before, const String &p_not_after) {}

PackedByteArray CryptoMbedTLS::generate_random_bytes(int p_bytes) {}

mbedtls_md_type_t CryptoMbedTLS::md_type_from_hashtype(HashingContext::HashType p_hash_type, int &r_size) {}

Vector<uint8_t> CryptoMbedTLS::sign(HashingContext::HashType p_hash_type, const Vector<uint8_t> &p_hash, Ref<CryptoKey> p_key) {}

bool CryptoMbedTLS::verify(HashingContext::HashType p_hash_type, const Vector<uint8_t> &p_hash, const Vector<uint8_t> &p_signature, Ref<CryptoKey> p_key) {}

Vector<uint8_t> CryptoMbedTLS::encrypt(Ref<CryptoKey> p_key, const Vector<uint8_t> &p_plaintext) {}

Vector<uint8_t> CryptoMbedTLS::decrypt(Ref<CryptoKey> p_key, const Vector<uint8_t> &p_ciphertext) {}