@@ -92,6 +92,7 @@ struct Private {
9292 }
9393};
9494
95+ #ifdef HAS_KEYSHARES
9596struct MIDSIDResultData {
9697 int code;
9798 std::string_view str;
@@ -135,6 +136,7 @@ getMIDSIDDescription(libcdoc::result_t code)
135136 }
136137 return {};
137138}
139+ #endif
138140
139141thread_local std::string error;
140142
@@ -150,9 +152,11 @@ libcdoc::NetworkBackend::getLastErrorStr(result_t code) const
150152 default :
151153 break ;
152154 }
155+ #ifdef HAS_KEYSHARES
153156 std::string_view str = getMIDSIDDescription (code);
154157 if (!str.empty ()) return std::string (str);
155- return libcdoc::getErrorStr (code);
158+ #endif
159+ return libcdoc::getErrorStr (code);
156160}
157161
158162//
@@ -312,6 +316,7 @@ libcdoc::NetworkBackend::sendKey (CapsuleInfo& dst, const std::string& url, cons
312316 return OK;
313317}
314318
319+ #ifdef HAS_KEYSHARES
315320libcdoc::result_t
316321libcdoc::NetworkBackend::sendShare (std::vector<uint8_t >& dst, const std::string& url, const std::string& recipient, const std::vector<uint8_t >& share)
317322{
@@ -354,6 +359,7 @@ libcdoc::NetworkBackend::sendShare(std::vector<uint8_t>& dst, const std::string&
354359
355360 return OK;
356361}
362+ #endif
357363
358364libcdoc::result_t
359365libcdoc::NetworkBackend::fetchKey (std::vector<uint8_t >& dst, const std::string& url, const std::string& transaction_id)
@@ -392,6 +398,7 @@ libcdoc::NetworkBackend::fetchKey (std::vector<uint8_t>& dst, const std::string&
392398 return libcdoc::OK;
393399}
394400
401+ #ifdef HAS_KEYSHARES
395402libcdoc::result_t
396403libcdoc::NetworkBackend::fetchNonce (std::vector<uint8_t >& dst, const std::string& url, const std::string& share_id)
397404{
@@ -475,6 +482,7 @@ libcdoc::NetworkBackend::fetchShare(ShareInfo& share, const std::string& url, co
475482 share = {std::move (shareval), std::move (recipient)};
476483 return OK;
477484}
485+ #endif
478486
479487ECDSA_SIG *
480488ecdsa_do_sign (const unsigned char *dgst, int dgst_len, const BIGNUM * /* inv*/ , const BIGNUM * /* rp*/ , EC_KEY *eckey)
@@ -527,6 +535,7 @@ rsa_sign(int type, const unsigned char *m, unsigned int m_len, unsigned char *si
527535 return 1 ;
528536}
529537
538+ #ifdef HAS_KEYSHARES
530539libcdoc::result_t
531540libcdoc::NetworkBackend::showVerificationCode (unsigned int code)
532541{
@@ -879,3 +888,4 @@ libcdoc::NetworkBackend::signMID(std::vector<uint8_t>& dst, std::vector<uint8_t>
879888
880889 return OK;
881890}
891+ #endif
0 commit comments