cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

asn1_encoder.h (1006B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2
      3#ifndef _LINUX_ASN1_ENCODER_H
      4#define _LINUX_ASN1_ENCODER_H
      5
      6#include <linux/types.h>
      7#include <linux/asn1.h>
      8#include <linux/asn1_ber_bytecode.h>
      9#include <linux/bug.h>
     10
     11#define asn1_oid_len(oid) (sizeof(oid)/sizeof(u32))
     12unsigned char *
     13asn1_encode_integer(unsigned char *data, const unsigned char *end_data,
     14		    s64 integer);
     15unsigned char *
     16asn1_encode_oid(unsigned char *data, const unsigned char *end_data,
     17		u32 oid[], int oid_len);
     18unsigned char *
     19asn1_encode_tag(unsigned char *data, const unsigned char *end_data,
     20		u32 tag, const unsigned char *string, int len);
     21unsigned char *
     22asn1_encode_octet_string(unsigned char *data,
     23			 const unsigned char *end_data,
     24			 const unsigned char *string, u32 len);
     25unsigned char *
     26asn1_encode_sequence(unsigned char *data, const unsigned char *end_data,
     27		     const unsigned char *seq, int len);
     28unsigned char *
     29asn1_encode_boolean(unsigned char *data, const unsigned char *end_data,
     30		    bool val);
     31
     32#endif