]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make fr_der_decode_pair_dbuff a public function
authorNick Porter <nick@portercomputing.co.uk>
Fri, 27 Jun 2025 16:33:29 +0000 (17:33 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 27 Jun 2025 18:39:25 +0000 (19:39 +0100)
So the DER decoder can be used from other modules

src/protocols/der/decode.c
src/protocols/der/der.h

index e1e4d2dbb7797134f3cc1be4ad8c5c2f69719502..71dda55e7b8e33c0f3377193868800d39cc50989 100644 (file)
@@ -73,9 +73,6 @@ typedef struct {
  *     - 0 no bytes decoded.
  *     - < 0 on error.  May be the offset (as a negative value) where the error occurred.
  */
-static ssize_t fr_der_decode_pair_dbuff(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent,
-                                       fr_dbuff_t *in, fr_der_decode_ctx_t *decode_ctx) CC_HINT(nonnull);
-
 static ssize_t fr_der_decode_string(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent, fr_dbuff_t *in,
                                    bool const allowed_chars[], fr_der_decode_ctx_t *decode_ctx) CC_HINT(nonnull(1,2,3,4,6));
 
@@ -2362,8 +2359,8 @@ static ssize_t fr_der_decode_string(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dic
        return fr_dbuff_set(in, &our_in);
 }
 
-static ssize_t fr_der_decode_pair_dbuff(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent,
-                                       fr_dbuff_t *in, fr_der_decode_ctx_t *decode_ctx)
+ssize_t fr_der_decode_pair_dbuff(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent,
+                                fr_dbuff_t *in, fr_der_decode_ctx_t *decode_ctx)
 {
        fr_dbuff_t           our_in = FR_DBUFF(in);
        fr_der_tag_decode_t const *func;
index 9519c952cb641e9e724f3eb9973a05084af27659..9e8b99447f54ba482b708a4d92ce2471e631dc11 100644 (file)
@@ -147,3 +147,9 @@ char        const *fr_der_tag_to_str(fr_der_tag_t tag);
 
 int    fr_der_global_init(void);
 void   fr_der_global_free(void);
+
+/*
+ *     decode.c
+ */
+ssize_t        fr_der_decode_pair_dbuff(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent,
+                                fr_dbuff_t *in, fr_der_decode_ctx_t *decode_ctx);