92e350
From ea4baf50d57a7a41164fedcd1b10fdb0438305c5 Mon Sep 17 00:00:00 2001
92e350
From: AnthonyA <ascanio.alba7@gmail.com>
92e350
Date: Mon, 19 Mar 2018 15:58:21 +0800
92e350
Subject: [PATCH] pkcs11-tool: make ECPoint behaviour standards compliant by
92e350
 default
92e350
92e350
Fixes #1286. The behaviour of pkcs11-tool will follow the standard -
92e350
send DER. If EC_POINT_NO_ASN1_OCTET_STRING is defined then it will
92e350
write plain bytes.
92e350
---
92e350
 src/tools/pkcs11-tool.c | 2 +-
92e350
 1 file changed, 1 insertion(+), 1 deletion(-)
92e350
92e350
diff --git a/src/tools/pkcs11-tool.c b/src/tools/pkcs11-tool.c
92e350
index 876bba2dc..63e5c5f7f 100644
92e350
--- a/src/tools/pkcs11-tool.c
92e350
+++ b/src/tools/pkcs11-tool.c
92e350
@@ -2632,7 +2632,7 @@ parse_ec_pkey(EVP_PKEY *pkey, int private, struct gostkey_info *gost)
92e350
 		header_len = point-gost->public.value;
92e350
 		memcpy(point, buf, point_len);
92e350
 		gost->public.len = header_len+point_len;
92e350
-#ifndef EC_POINT_NO_ASN1_OCTET_STRING // workaround for non-compliant cards not expecting DER encoding
92e350
+#ifdef EC_POINT_NO_ASN1_OCTET_STRING // workaround for non-compliant cards not expecting DER encoding
92e350
 		gost->public.len   -= header_len;
92e350
 		gost->public.value += header_len;
92e350
 #endif
92e350