objects.h (59191) | objects.h (68651) |
---|---|
1/* crypto/objects/objects.h */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 45 unchanged lines hidden (view full) --- 54 * derivative of this code cannot be changed. i.e. this code cannot simply be 55 * copied and put under another distribution licence 56 * [including the GNU Public Licence.] 57 */ 58 59#ifndef HEADER_OBJECTS_H 60#define HEADER_OBJECTS_H 61 | 1/* crypto/objects/objects.h */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 45 unchanged lines hidden (view full) --- 54 * derivative of this code cannot be changed. i.e. this code cannot simply be 55 * copied and put under another distribution licence 56 * [including the GNU Public Licence.] 57 */ 58 59#ifndef HEADER_OBJECTS_H 60#define HEADER_OBJECTS_H 61 |
62#ifdef __cplusplus 63extern "C" { 64#endif | 62#define USE_OBJ_MAC |
65 | 63 |
64#ifdef USE_OBJ_MAC 65#include <openssl/obj_mac.h> 66#else |
|
66#define SN_undef "UNDEF" 67#define LN_undef "undefined" 68#define NID_undef 0 69#define OBJ_undef 0L 70 71#define SN_Algorithm "Algorithm" 72#define LN_algorithm "algorithm" 73#define NID_algorithm 38 --- 874 unchanged lines hidden (view full) --- 948#define LN_ad_ca_issuers "CA Issuers" 949#define NID_ad_ca_issuers 179 950#define OBJ_ad_ca_issuers OBJ_id_ad,2L 951 952#define SN_OCSP_sign "OCSPSigning" 953#define LN_OCSP_sign "OCSP Signing" 954#define NID_OCSP_sign 180 955#define OBJ_OCSP_sign OBJ_id_kp,9L | 67#define SN_undef "UNDEF" 68#define LN_undef "undefined" 69#define NID_undef 0 70#define OBJ_undef 0L 71 72#define SN_Algorithm "Algorithm" 73#define LN_algorithm "algorithm" 74#define NID_algorithm 38 --- 874 unchanged lines hidden (view full) --- 949#define LN_ad_ca_issuers "CA Issuers" 950#define NID_ad_ca_issuers 179 951#define OBJ_ad_ca_issuers OBJ_id_ad,2L 952 953#define SN_OCSP_sign "OCSPSigning" 954#define LN_OCSP_sign "OCSP Signing" 955#define NID_OCSP_sign 180 956#define OBJ_OCSP_sign OBJ_id_kp,9L |
957#endif /* USE_OBJ_MAC */ |
|
956 957#include <openssl/bio.h> 958#include <openssl/asn1.h> 959 960#define OBJ_NAME_TYPE_UNDEF 0x00 961#define OBJ_NAME_TYPE_MD_METH 0x01 962#define OBJ_NAME_TYPE_CIPHER_METH 0x02 963#define OBJ_NAME_TYPE_PKEY_METH 0x03 964#define OBJ_NAME_TYPE_COMP_METH 0x04 965#define OBJ_NAME_TYPE_NUM 0x05 966 967#define OBJ_NAME_ALIAS 0x8000 968 969 | 958 959#include <openssl/bio.h> 960#include <openssl/asn1.h> 961 962#define OBJ_NAME_TYPE_UNDEF 0x00 963#define OBJ_NAME_TYPE_MD_METH 0x01 964#define OBJ_NAME_TYPE_CIPHER_METH 0x02 965#define OBJ_NAME_TYPE_PKEY_METH 0x03 966#define OBJ_NAME_TYPE_COMP_METH 0x04 967#define OBJ_NAME_TYPE_NUM 0x05 968 969#define OBJ_NAME_ALIAS 0x8000 970 971 |
972#ifdef __cplusplus 973extern "C" { 974#endif 975 |
|
970typedef struct obj_name_st 971 { 972 int type; 973 int alias; 974 const char *name; 975 const char *data; 976 } OBJ_NAME; 977 978#define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) 979 980 981int OBJ_NAME_init(void); | 976typedef struct obj_name_st 977 { 978 int type; 979 int alias; 980 const char *name; 981 const char *data; 982 } OBJ_NAME; 983 984#define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) 985 986 987int OBJ_NAME_init(void); |
982int OBJ_NAME_new_index(unsigned long (*hash_func)(),int (*cmp_func)(), 983 void (*free_func)()); | 988int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),int (*cmp_func)(const void *, const void *), 989 void (*free_func)(const char *, int, const char *)); |
984const char *OBJ_NAME_get(const char *name,int type); 985int OBJ_NAME_add(const char *name,int type,const char *data); 986int OBJ_NAME_remove(const char *name,int type); 987void OBJ_NAME_cleanup(int type); /* -1 for everything */ 988 989ASN1_OBJECT * OBJ_dup(ASN1_OBJECT *o); 990ASN1_OBJECT * OBJ_nid2obj(int n); 991const char * OBJ_nid2ln(int n); 992const char * OBJ_nid2sn(int n); 993int OBJ_obj2nid(ASN1_OBJECT *o); 994ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name); 995int OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *a, int no_name); 996int OBJ_txt2nid(char *s); 997int OBJ_ln2nid(const char *s); 998int OBJ_sn2nid(const char *s); 999int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); | 990const char *OBJ_NAME_get(const char *name,int type); 991int OBJ_NAME_add(const char *name,int type,const char *data); 992int OBJ_NAME_remove(const char *name,int type); 993void OBJ_NAME_cleanup(int type); /* -1 for everything */ 994 995ASN1_OBJECT * OBJ_dup(ASN1_OBJECT *o); 996ASN1_OBJECT * OBJ_nid2obj(int n); 997const char * OBJ_nid2ln(int n); 998const char * OBJ_nid2sn(int n); 999int OBJ_obj2nid(ASN1_OBJECT *o); 1000ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name); 1001int OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *a, int no_name); 1002int OBJ_txt2nid(char *s); 1003int OBJ_ln2nid(const char *s); 1004int OBJ_sn2nid(const char *s); 1005int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); |
1000char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)()); | 1006char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)(const void *, const void *)); |
1001 1002void ERR_load_OBJ_strings(void ); 1003 1004int OBJ_new_nid(int num); 1005int OBJ_add_object(ASN1_OBJECT *obj); 1006int OBJ_create(char *oid,char *sn,char *ln); 1007void OBJ_cleanup(void ); 1008int OBJ_create_objects(BIO *in); --- 24 unchanged lines hidden --- | 1007 1008void ERR_load_OBJ_strings(void ); 1009 1010int OBJ_new_nid(int num); 1011int OBJ_add_object(ASN1_OBJECT *obj); 1012int OBJ_create(char *oid,char *sn,char *ln); 1013void OBJ_cleanup(void ); 1014int OBJ_create_objects(BIO *in); --- 24 unchanged lines hidden --- |