Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include/openssl
File: objects.h
/*
[0] Fix | Delete
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
[1] Fix | Delete
*
[2] Fix | Delete
* Licensed under the OpenSSL license (the "License"). You may not use
[3] Fix | Delete
* this file except in compliance with the License. You can obtain a copy
[4] Fix | Delete
* in the file LICENSE in the source distribution or at
[5] Fix | Delete
* https://www.openssl.org/source/license.html
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
#ifndef HEADER_OBJECTS_H
[9] Fix | Delete
# define HEADER_OBJECTS_H
[10] Fix | Delete
[11] Fix | Delete
# include <openssl/obj_mac.h>
[12] Fix | Delete
# include <openssl/bio.h>
[13] Fix | Delete
# include <openssl/asn1.h>
[14] Fix | Delete
# include <openssl/objectserr.h>
[15] Fix | Delete
[16] Fix | Delete
# define OBJ_NAME_TYPE_UNDEF 0x00
[17] Fix | Delete
# define OBJ_NAME_TYPE_MD_METH 0x01
[18] Fix | Delete
# define OBJ_NAME_TYPE_CIPHER_METH 0x02
[19] Fix | Delete
# define OBJ_NAME_TYPE_PKEY_METH 0x03
[20] Fix | Delete
# define OBJ_NAME_TYPE_COMP_METH 0x04
[21] Fix | Delete
# define OBJ_NAME_TYPE_NUM 0x05
[22] Fix | Delete
[23] Fix | Delete
# define OBJ_NAME_ALIAS 0x8000
[24] Fix | Delete
[25] Fix | Delete
# define OBJ_BSEARCH_VALUE_ON_NOMATCH 0x01
[26] Fix | Delete
# define OBJ_BSEARCH_FIRST_VALUE_ON_MATCH 0x02
[27] Fix | Delete
[28] Fix | Delete
[29] Fix | Delete
#ifdef __cplusplus
[30] Fix | Delete
extern "C" {
[31] Fix | Delete
#endif
[32] Fix | Delete
[33] Fix | Delete
typedef struct obj_name_st {
[34] Fix | Delete
int type;
[35] Fix | Delete
int alias;
[36] Fix | Delete
const char *name;
[37] Fix | Delete
const char *data;
[38] Fix | Delete
} OBJ_NAME;
[39] Fix | Delete
[40] Fix | Delete
# define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c)
[41] Fix | Delete
[42] Fix | Delete
int OBJ_NAME_init(void);
[43] Fix | Delete
int OBJ_NAME_new_index(unsigned long (*hash_func) (const char *),
[44] Fix | Delete
int (*cmp_func) (const char *, const char *),
[45] Fix | Delete
void (*free_func) (const char *, int, const char *));
[46] Fix | Delete
const char *OBJ_NAME_get(const char *name, int type);
[47] Fix | Delete
int OBJ_NAME_add(const char *name, int type, const char *data);
[48] Fix | Delete
int OBJ_NAME_remove(const char *name, int type);
[49] Fix | Delete
void OBJ_NAME_cleanup(int type); /* -1 for everything */
[50] Fix | Delete
void OBJ_NAME_do_all(int type, void (*fn) (const OBJ_NAME *, void *arg),
[51] Fix | Delete
void *arg);
[52] Fix | Delete
void OBJ_NAME_do_all_sorted(int type,
[53] Fix | Delete
void (*fn) (const OBJ_NAME *, void *arg),
[54] Fix | Delete
void *arg);
[55] Fix | Delete
[56] Fix | Delete
ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
[57] Fix | Delete
ASN1_OBJECT *OBJ_nid2obj(int n);
[58] Fix | Delete
const char *OBJ_nid2ln(int n);
[59] Fix | Delete
const char *OBJ_nid2sn(int n);
[60] Fix | Delete
int OBJ_obj2nid(const ASN1_OBJECT *o);
[61] Fix | Delete
ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name);
[62] Fix | Delete
int OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *a, int no_name);
[63] Fix | Delete
int OBJ_txt2nid(const char *s);
[64] Fix | Delete
int OBJ_ln2nid(const char *s);
[65] Fix | Delete
int OBJ_sn2nid(const char *s);
[66] Fix | Delete
int OBJ_cmp(const ASN1_OBJECT *a, const ASN1_OBJECT *b);
[67] Fix | Delete
const void *OBJ_bsearch_(const void *key, const void *base, int num, int size,
[68] Fix | Delete
int (*cmp) (const void *, const void *));
[69] Fix | Delete
const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
[70] Fix | Delete
int size,
[71] Fix | Delete
int (*cmp) (const void *, const void *),
[72] Fix | Delete
int flags);
[73] Fix | Delete
[74] Fix | Delete
# define _DECLARE_OBJ_BSEARCH_CMP_FN(scope, type1, type2, nm) \
[75] Fix | Delete
static int nm##_cmp_BSEARCH_CMP_FN(const void *, const void *); \
[76] Fix | Delete
static int nm##_cmp(type1 const *, type2 const *); \
[77] Fix | Delete
scope type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num)
[78] Fix | Delete
[79] Fix | Delete
# define DECLARE_OBJ_BSEARCH_CMP_FN(type1, type2, cmp) \
[80] Fix | Delete
_DECLARE_OBJ_BSEARCH_CMP_FN(static, type1, type2, cmp)
[81] Fix | Delete
# define DECLARE_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \
[82] Fix | Delete
type2 * OBJ_bsearch_##nm(type1 *key, type2 const *base, int num)
[83] Fix | Delete
[84] Fix | Delete
/*-
[85] Fix | Delete
* Unsolved problem: if a type is actually a pointer type, like
[86] Fix | Delete
* nid_triple is, then its impossible to get a const where you need
[87] Fix | Delete
* it. Consider:
[88] Fix | Delete
*
[89] Fix | Delete
* typedef int nid_triple[3];
[90] Fix | Delete
* const void *a_;
[91] Fix | Delete
* const nid_triple const *a = a_;
[92] Fix | Delete
*
[93] Fix | Delete
* The assignment discards a const because what you really want is:
[94] Fix | Delete
*
[95] Fix | Delete
* const int const * const *a = a_;
[96] Fix | Delete
*
[97] Fix | Delete
* But if you do that, you lose the fact that a is an array of 3 ints,
[98] Fix | Delete
* which breaks comparison functions.
[99] Fix | Delete
*
[100] Fix | Delete
* Thus we end up having to cast, sadly, or unpack the
[101] Fix | Delete
* declarations. Or, as I finally did in this case, declare nid_triple
[102] Fix | Delete
* to be a struct, which it should have been in the first place.
[103] Fix | Delete
*
[104] Fix | Delete
* Ben, August 2008.
[105] Fix | Delete
*
[106] Fix | Delete
* Also, strictly speaking not all types need be const, but handling
[107] Fix | Delete
* the non-constness means a lot of complication, and in practice
[108] Fix | Delete
* comparison routines do always not touch their arguments.
[109] Fix | Delete
*/
[110] Fix | Delete
[111] Fix | Delete
# define IMPLEMENT_OBJ_BSEARCH_CMP_FN(type1, type2, nm) \
[112] Fix | Delete
static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \
[113] Fix | Delete
{ \
[114] Fix | Delete
type1 const *a = a_; \
[115] Fix | Delete
type2 const *b = b_; \
[116] Fix | Delete
return nm##_cmp(a,b); \
[117] Fix | Delete
} \
[118] Fix | Delete
static type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \
[119] Fix | Delete
{ \
[120] Fix | Delete
return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \
[121] Fix | Delete
nm##_cmp_BSEARCH_CMP_FN); \
[122] Fix | Delete
} \
[123] Fix | Delete
extern void dummy_prototype(void)
[124] Fix | Delete
[125] Fix | Delete
# define IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(type1, type2, nm) \
[126] Fix | Delete
static int nm##_cmp_BSEARCH_CMP_FN(const void *a_, const void *b_) \
[127] Fix | Delete
{ \
[128] Fix | Delete
type1 const *a = a_; \
[129] Fix | Delete
type2 const *b = b_; \
[130] Fix | Delete
return nm##_cmp(a,b); \
[131] Fix | Delete
} \
[132] Fix | Delete
type2 *OBJ_bsearch_##nm(type1 *key, type2 const *base, int num) \
[133] Fix | Delete
{ \
[134] Fix | Delete
return (type2 *)OBJ_bsearch_(key, base, num, sizeof(type2), \
[135] Fix | Delete
nm##_cmp_BSEARCH_CMP_FN); \
[136] Fix | Delete
} \
[137] Fix | Delete
extern void dummy_prototype(void)
[138] Fix | Delete
[139] Fix | Delete
# define OBJ_bsearch(type1,key,type2,base,num,cmp) \
[140] Fix | Delete
((type2 *)OBJ_bsearch_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \
[141] Fix | Delete
num,sizeof(type2), \
[142] Fix | Delete
((void)CHECKED_PTR_OF(type1,cmp##_type_1), \
[143] Fix | Delete
(void)CHECKED_PTR_OF(type2,cmp##_type_2), \
[144] Fix | Delete
cmp##_BSEARCH_CMP_FN)))
[145] Fix | Delete
[146] Fix | Delete
# define OBJ_bsearch_ex(type1,key,type2,base,num,cmp,flags) \
[147] Fix | Delete
((type2 *)OBJ_bsearch_ex_(CHECKED_PTR_OF(type1,key),CHECKED_PTR_OF(type2,base), \
[148] Fix | Delete
num,sizeof(type2), \
[149] Fix | Delete
((void)CHECKED_PTR_OF(type1,cmp##_type_1), \
[150] Fix | Delete
(void)type_2=CHECKED_PTR_OF(type2,cmp##_type_2), \
[151] Fix | Delete
cmp##_BSEARCH_CMP_FN)),flags)
[152] Fix | Delete
[153] Fix | Delete
int OBJ_new_nid(int num);
[154] Fix | Delete
int OBJ_add_object(const ASN1_OBJECT *obj);
[155] Fix | Delete
int OBJ_create(const char *oid, const char *sn, const char *ln);
[156] Fix | Delete
#if OPENSSL_API_COMPAT < 0x10100000L
[157] Fix | Delete
# define OBJ_cleanup() while(0) continue
[158] Fix | Delete
#endif
[159] Fix | Delete
int OBJ_create_objects(BIO *in);
[160] Fix | Delete
[161] Fix | Delete
size_t OBJ_length(const ASN1_OBJECT *obj);
[162] Fix | Delete
const unsigned char *OBJ_get0_data(const ASN1_OBJECT *obj);
[163] Fix | Delete
[164] Fix | Delete
int OBJ_find_sigid_algs(int signid, int *pdig_nid, int *ppkey_nid);
[165] Fix | Delete
int OBJ_find_sigid_by_algs(int *psignid, int dig_nid, int pkey_nid);
[166] Fix | Delete
int OBJ_add_sigid(int signid, int dig_id, int pkey_id);
[167] Fix | Delete
void OBJ_sigid_free(void);
[168] Fix | Delete
[169] Fix | Delete
[170] Fix | Delete
# ifdef __cplusplus
[171] Fix | Delete
}
[172] Fix | Delete
# endif
[173] Fix | Delete
#endif
[174] Fix | Delete
[175] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function