x509asn1: move declaration to header

Fixing clang-tidy warning:
```
tests/unit/unit1666.c:50:12: error: call to undeclared function 'encodeOID'; ISO C99 and later do not support implicit function declarations [clang-diagnostic-implicit-function-declaration]
   50 |   result = encodeOID(dbuf, oid, oid + spec->size);
      |            ^
```
Ref: https://github.com/curl/curl/actions/runs/23297585235/job/67749144361?pr=21008#step:46:736

Follow-up to 673e14cd33 #21003

Closes #21010
This commit is contained in:
Viktor Szakats 2026-03-19 14:47:12 +01:00
parent 51f813308e
commit f95fadd116
No known key found for this signature in database
2 changed files with 3 additions and 1 deletions

View File

@ -427,7 +427,6 @@ static CURLcode utf8asn1str(struct dynbuf *to, int type, const char *from,
*
* @unittest 1666
*/
UNITTEST CURLcode encodeOID(struct dynbuf *buf, const char *b, const char *e);
UNITTEST CURLcode encodeOID(struct dynbuf *store,
const char *beg, const char *end)
{

View File

@ -77,6 +77,9 @@ CURLcode Curl_verifyhost(struct Curl_cfilter *cf, struct Curl_easy *data,
const char *beg, const char *end);
#ifdef UNITTESTS
UNITTEST CURLcode encodeOID(struct dynbuf *store,
const char *beg, const char *end);
#if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_MBEDTLS) || \
defined(USE_RUSTLS)