From nobody@FreeBSD.org  Mon Dec 16 15:59:26 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 48DA0CF2
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 15:59:26 +0000 (UTC)
Received: from oldred.freebsd.org (oldred.freebsd.org [IPv6:2001:1900:2254:206a::50:4])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 346DA1CDB
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 15:59:26 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rBGFxPJL086389
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 16 Dec 2013 15:59:25 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rBGFxPH6086388;
	Mon, 16 Dec 2013 15:59:25 GMT
	(envelope-from nobody)
Message-Id: <201312161559.rBGFxPH6086388@oldred.freebsd.org>
Date: Mon, 16 Dec 2013 15:59:25 GMT
From: Ivan Zhdanov <ivan.zhdanov@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: GOST engine in OpenSSL exists but doesn't work
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         184805
>Category:       kern
>Synopsis:       [libcrypto] [patch] GOST engine in OpenSSL exists but doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 16 16:00:01 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun Apr 20 21:52:36 UTC 2014
>Originator:     Ivan Zhdanov
>Release:        10.0-RC2
>Organization:
>Environment:
FreeBSD test.example.org 10.0-RC2 FreeBSD 10.0-RC2 #0 r259404: Sun Dec 15 08:18:20 UTC 2013     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
When try use GOST engine with OpenSSL, application show error:

34379118248:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:/usr/src/secure/lib/libcrypto/../../../crypto/openssl/crypto/dso/dso_dlfcn.c:187:filename(/usr/lib/engines/libgost.so): /usr/lib/engines/libgost.so: Undefined symbol "ERR_load_GOST_strings"
>How-To-Repeat:
Add in file /etc/ssl/openssl.cnf
=============================
openssl_conf            = openssl_def

[ openssl_def ]
engines = engine_section

[ engine_section ]
gost = gost_section

[ gost_section ]
engine_id = gost
default_algorithms = ALL
=============================
and try show all ciphers:

"openssl ciphers"
>Fix:
Add in file /usr/src/secure/lib/libcrypto/engines/libgost/Makefile, section "SRCS", missing file:
e_gost_err.c

and rebuild.

patch in attachment.

Patch attached with submission follows:

Index: secure/lib/libcrypto/engines/libgost/Makefile
===================================================================
--- secure/lib/libcrypto/engines/libgost/Makefile	(revision 259463)
+++ secure/lib/libcrypto/engines/libgost/Makefile	(working copy)
@@ -3,6 +3,7 @@
 SHLIB_NAME?= libgost.so
 SRCS=	gost2001.c gost2001_keyx.c gost89.c gost94_keyx.c gost_ameth.c \
 	gost_asn1.c gost_crypt.c gost_ctl.c gost_eng.c gost_keywrap.c \
-	gost_md.c gost_params.c gost_pmeth.c gost_sign.c gosthash.c
+	gost_md.c gost_params.c gost_pmeth.c gost_sign.c gosthash.c \
+	e_gost_err.c
 
 .include <bsd.lib.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:
