/* * ____ _________ __ _ * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____ * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/ * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__ * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/ * /____/ * * SharkSSL Embedded SSL/TLS Stack **************************************************************************** * PROGRAM MODULE * Example helpers. * * $Id: SharkSslOsslExample.c 6918 2026-11-24 21:49:22Z wini $ * * COPYRIGHT: Real Time Logic LLC, 2026 * * This software is copyrighted by and is the sole property of Real * Time Logic LLC. All rights, title, ownership, or other interests in * the software remain the property of Real Time Logic LLC. This * software may only be used in accordance with the terms and * conditions stipulated in the corresponding license agreement under * which the software has been supplied. Any unauthorized use, * duplication, transmission, distribution, or disclosure of this * software is expressly forbidden. * * This Copyright notice may not be removed or modified without prior * written consent of Real Time Logic LLC. * * Real Time Logic LLC. reserves the right to modify this software * without notice. * * http://www.realtimelogic.com * http://www.sharkssl.com **************************************************************************** * */ #include "SharkSslOsslExample.h" #include #include int SharkSslOsslExample_error(const char* operation) { unsigned long code; char text[256]; fprintf(stderr, "%s failed\n", operation); while ((code = ERR_get_error()) != 0) { ERR_error_string_n(code, text, sizeof(text)); fprintf(stderr, " %s\n", text); } return 1; } void SharkSslOsslExample_hex(const char* name, const unsigned char* data, size_t size) { size_t i; printf("%s=", name); for (i = 0; i < size; ++i) { printf("%02x", (unsigned int)data[i]); } putchar('\n'); }