From 80ffe13f3e2b00e35ad4acb68e12b0ff891a7967 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 8 Feb 2019 15:12:51 -0500 Subject: [PATCH] correct offline signature layout --- libi2pd/Identity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libi2pd/Identity.cpp b/libi2pd/Identity.cpp index cc26a857..3866795a 100644 --- a/libi2pd/Identity.cpp +++ b/libi2pd/Identity.cpp @@ -740,8 +740,8 @@ namespace data keys.m_OfflineSignature.resize (pubKeyLen + m_Public->GetSignatureLen () + 6); htobe32buf (keys.m_OfflineSignature.data (), expires); // expires htobe16buf (keys.m_OfflineSignature.data () + 4, type); // type - GenerateSigningKeyPair (type, keys.m_SigningPrivateKey, keys.m_OfflineSignature.data () + 4); // public key - Sign (keys.m_OfflineSignature.data (), pubKeyLen + 6, keys.m_OfflineSignature.data () + 6); // signature + GenerateSigningKeyPair (type, keys.m_SigningPrivateKey, keys.m_OfflineSignature.data () + 6); // public key + Sign (keys.m_OfflineSignature.data (), pubKeyLen + 6, keys.m_OfflineSignature.data () + 6 + pubKeyLen); // signature // recreate signer keys.m_Signer = nullptr; keys.CreateSigner ();