<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Edwintorok</id>
	<title>OpenSSLWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Edwintorok"/>
	<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php/Special:Contributions/Edwintorok"/>
	<updated>2026-04-10T07:59:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2467</id>
		<title>Talk:OpenSSL 1.1.0 Changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2467"/>
		<updated>2016-09-23T13:33:57Z</updated>

		<summary type="html">&lt;p&gt;Edwintorok: the #ifdef mention is enough&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Converting code to be compatible with both OpenSSL 1.0.x and 1.1.x ==&lt;br /&gt;
&lt;br /&gt;
Small correction to the example at [[1.1_API_Changes#Adding_forward-compatible_code_to_older_versions]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;HMAC_CTX_reset&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;EVP_MD_CTX_free&amp;lt;/tt&amp;gt; are OpenSSL 1.1 APIs themselves so their use should be avoided in the &amp;lt;tt&amp;gt;#if&amp;lt;/tt&amp;gt; section.&lt;br /&gt;
&lt;br /&gt;
Suggested example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 static HMAC_CTX *HMAC_CTX_new(void)&lt;br /&gt;
 {&lt;br /&gt;
    HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));&lt;br /&gt;
    if (ctx != NULL)&lt;br /&gt;
        HMAC_CTX_init(ctx);&lt;br /&gt;
    return ctx;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void HMAC_CTX_free(HMAC_CTX *ctx)&lt;br /&gt;
 {&lt;br /&gt;
    if (ctx != NULL) {&lt;br /&gt;
        HMAC_CTX_cleanup(ctx);&lt;br /&gt;
        OPENSSL_free(ctx);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly examples for other APIs that I encountered:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define EVP_MD_CTX_new EVP_MD_CTX_create&lt;br /&gt;
 #define EVP_MD_CTX_free EVP_MD_CTX_destroy&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
--[[User:Edwintorok|Edwintorok]] ([[User talk:Edwintorok|talk]]) 13:30, 23 September 2016 (UTC)&lt;/div&gt;</summary>
		<author><name>Edwintorok</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2466</id>
		<title>Talk:OpenSSL 1.1.0 Changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2466"/>
		<updated>2016-09-23T13:30:09Z</updated>

		<summary type="html">&lt;p&gt;Edwintorok: sign my edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Converting code to be compatible with both OpenSSL 1.0.x and 1.1.x ==&lt;br /&gt;
&lt;br /&gt;
Small correction to the example at [[1.1_API_Changes#Adding_forward-compatible_code_to_older_versions]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;HMAC_CTX_reset&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;EVP_MD_CTX_free&amp;lt;/tt&amp;gt; are OpenSSL 1.1 APIs themselves so their use should be avoided in the &amp;lt;tt&amp;gt;#if&amp;lt;/tt&amp;gt; section.&lt;br /&gt;
Also LibreSSL claims to be &amp;lt;tt&amp;gt;OPENSSL_VERSION_NUMBER 0x20000000L&amp;lt;/tt&amp;gt;, but doesn't support the new OpenSSL 1.1.0 API yet.&lt;br /&gt;
&lt;br /&gt;
Suggested example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 static HMAC_CTX *HMAC_CTX_new(void)&lt;br /&gt;
 {&lt;br /&gt;
    HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));&lt;br /&gt;
    if (ctx != NULL)&lt;br /&gt;
        HMAC_CTX_init(ctx);&lt;br /&gt;
    return ctx;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void HMAC_CTX_free(HMAC_CTX *ctx)&lt;br /&gt;
 {&lt;br /&gt;
    if (ctx != NULL) {&lt;br /&gt;
        HMAC_CTX_cleanup(ctx);&lt;br /&gt;
        OPENSSL_free(ctx);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly examples for other APIs that I encountered:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define EVP_MD_CTX_new EVP_MD_CTX_create&lt;br /&gt;
 #define EVP_MD_CTX_free EVP_MD_CTX_destroy&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
--[[User:Edwintorok|Edwintorok]] ([[User talk:Edwintorok|talk]]) 13:30, 23 September 2016 (UTC)&lt;/div&gt;</summary>
		<author><name>Edwintorok</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2465</id>
		<title>Talk:OpenSSL 1.1.0 Changes</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:OpenSSL_1.1.0_Changes&amp;diff=2465"/>
		<updated>2016-09-23T13:29:38Z</updated>

		<summary type="html">&lt;p&gt;Edwintorok: Correction to 1.0.x/1.1.x compatibility example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Converting code to be compatible with both OpenSSL 1.0.x and 1.1.x ==&lt;br /&gt;
&lt;br /&gt;
Small correction to the example at [[1.1_API_Changes#Adding_forward-compatible_code_to_older_versions]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;HMAC_CTX_reset&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;EVP_MD_CTX_free&amp;lt;/tt&amp;gt; are OpenSSL 1.1 APIs themselves so their use should be avoided in the &amp;lt;tt&amp;gt;#if&amp;lt;/tt&amp;gt; section.&lt;br /&gt;
Also LibreSSL claims to be &amp;lt;tt&amp;gt;OPENSSL_VERSION_NUMBER 0x20000000L&amp;lt;/tt&amp;gt;, but doesn't support the new OpenSSL 1.1.0 API yet.&lt;br /&gt;
&lt;br /&gt;
Suggested example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 static HMAC_CTX *HMAC_CTX_new(void)&lt;br /&gt;
 {&lt;br /&gt;
    HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx));&lt;br /&gt;
    if (ctx != NULL)&lt;br /&gt;
        HMAC_CTX_init(ctx);&lt;br /&gt;
    return ctx;&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static void HMAC_CTX_free(HMAC_CTX *ctx)&lt;br /&gt;
 {&lt;br /&gt;
    if (ctx != NULL) {&lt;br /&gt;
        HMAC_CTX_cleanup(ctx);&lt;br /&gt;
        OPENSSL_free(ctx);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Similarly examples for other APIs that I encountered:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined (LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define EVP_MD_CTX_new EVP_MD_CTX_create&lt;br /&gt;
 #define EVP_MD_CTX_free EVP_MD_CTX_destroy&lt;br /&gt;
 #endif&lt;br /&gt;
 &lt;br /&gt;
 #if (OPENSSL_VERSION_NUMBER &amp;lt; 0x10100000L) || defined(LIBRESSL_VERSION_NUMBER)&lt;br /&gt;
 #define ASN1_STRING_get0_data(x) ASN1_STRING_data(x)&lt;br /&gt;
 #endif&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Edwintorok</name></author>
	</entry>
</feed>