Lines Matching refs:WPACKET
638 * Offset into the buffer where the length of this WPACKET goes. We use an
653 typedef struct wpacket_st WPACKET;
670 /* Maximum number of bytes we will allow to be written to this WPACKET */
685 /* Error on WPACKET_close() if no data written to the WPACKET */
689 * Abandon all changes on WPACKET_close() if no data written to the WPACKET,
696 * Initialise a WPACKET with the buffer in |buf|. The buffer must exist
697 * for the whole time that the WPACKET is being used. Additionally |lenbytes| of
699 * WPACKET once we know it.
701 int WPACKET_init_len(WPACKET *pkt, BUF_MEM *buf, size_t lenbytes);
704 * Same as WPACKET_init_len except there is no preallocation of the WPACKET
707 int WPACKET_init(WPACKET *pkt, BUF_MEM *buf);
714 int WPACKET_init_null(WPACKET *pkt, size_t lenbytes);
717 * Same as WPACKET_init_null except we set the WPACKET to assume DER length
720 int WPACKET_init_null_der(WPACKET *pkt);
727 int WPACKET_init_static_len(WPACKET *pkt, unsigned char *buf, size_t len,
732 * WPACKET to write to the end of the buffer moving towards the start and use
735 int WPACKET_init_der(WPACKET *pkt, unsigned char *buf, size_t len);
740 int WPACKET_set_flags(WPACKET *pkt, unsigned int flags);
744 * packet to the required location (normally the start of the WPACKET) if
745 * appropriate. The top level WPACKET should be closed using WPACKET_finish()
748 int WPACKET_close(WPACKET *pkt);
751 * The same as WPACKET_close() but only for the top most WPACKET. Additionally
752 * frees memory resources for this WPACKET.
754 int WPACKET_finish(WPACKET *pkt);
760 * data is added to the WPACKET). This function fails if a sub-packet is of 0
763 int WPACKET_fill_lengths(WPACKET *pkt);
770 int WPACKET_start_sub_packet_len__(WPACKET *pkt, size_t lenbytes);
789 int WPACKET_start_sub_packet(WPACKET *pkt);
792 * Allocate bytes in the WPACKET for the output. This reserves the bytes
799 int WPACKET_allocate_bytes(WPACKET *pkt, size_t len,
808 int WPACKET_sub_allocate_bytes__(WPACKET *pkt, size_t len,
829 * followed by a WPACKET_allocate_bytes() call before any other WPACKET
842 int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes);
847 int WPACKET_sub_reserve_bytes__(WPACKET *pkt, size_t len,
863 * Write the value stored in |val| into the WPACKET. The value will consume
869 int WPACKET_put_bytes__(WPACKET *pkt, uint64_t val, size_t bytes);
886 /* Set a maximum size that we will not allow the WPACKET to grow beyond */
887 int WPACKET_set_max_size(WPACKET *pkt, size_t maxsize);
889 /* Copy |len| bytes of data from |*src| into the WPACKET. */
890 int WPACKET_memcpy(WPACKET *pkt, const void *src, size_t len);
892 /* Set |len| bytes of data to |ch| into the WPACKET. */
893 int WPACKET_memset(WPACKET *pkt, int ch, size_t len);
896 * Copy |len| bytes of data from |*src| into the WPACKET and prefix with its
900 int WPACKET_sub_memcpy__(WPACKET *pkt, const void *src, size_t len,
917 int WPACKET_get_total_written(WPACKET *pkt, size_t *written);
923 int WPACKET_get_length(WPACKET *pkt, size_t *len);
929 unsigned char *WPACKET_get_curr(WPACKET *pkt);
932 int WPACKET_is_null_buf(WPACKET *pkt);
934 /* Release resources in a WPACKET if a failure has occurred. */
935 void WPACKET_cleanup(WPACKET *pkt);