summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects/objects.h
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/objects/objects.h
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/objects/objects.h')
-rw-r--r--src/lib/libcrypto/objects/objects.h316
1 files changed, 280 insertions, 36 deletions
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h
index e1d555b47c..d03748e022 100644
--- a/src/lib/libcrypto/objects/objects.h
+++ b/src/lib/libcrypto/objects/objects.h
@@ -66,6 +66,7 @@ extern "C" {
66#define SN_undef "UNDEF" 66#define SN_undef "UNDEF"
67#define LN_undef "undefined" 67#define LN_undef "undefined"
68#define NID_undef 0 68#define NID_undef 0
69#define OBJ_undef 0L
69 70
70#define SN_Algorithm "Algorithm" 71#define SN_Algorithm "Algorithm"
71#define LN_algorithm "algorithm" 72#define LN_algorithm "algorithm"
@@ -383,13 +384,16 @@ extern "C" {
383#define NID_pbeWithSHA1AndRC2_CBC 68 384#define NID_pbeWithSHA1AndRC2_CBC 68
384#define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L 385#define OBJ_pbeWithSHA1AndRC2_CBC OBJ_pkcs,5L,11L
385 386
386/* proposed by microsoft to RSA */ 387/* proposed by microsoft to RSA as pbeWithSHA1AndRC4: it is now
387#define LN_pbeWithSHA1AndRC4 "pbeWithSHA1AndRC4" 388 * defined explicitly in PKCS#5 v2.0 as id-PBKDF2 which is something
388#define NID_pbeWithSHA1AndRC4 69 389 * completely different.
389#define OBJ_pbeWithSHA1AndRC4 OBJ_pkcs,5L,12L 390 */
391#define LN_id_pbkdf2 "PBKDF2"
392#define NID_id_pbkdf2 69
393#define OBJ_id_pbkdf2 OBJ_pkcs,5L,12L
390 394
391#define SN_dsaWithSHA1_2 "DSA-SHA1-old" 395#define SN_dsaWithSHA1_2 "DSA-SHA1-old"
392#define LN_dsaWithSHA1_2 "dsaWithSHA1" 396#define LN_dsaWithSHA1_2 "dsaWithSHA1-old"
393#define NID_dsaWithSHA1_2 70 397#define NID_dsaWithSHA1_2 70
394/* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */ 398/* Got this one from 'sdn706r20.pdf' which is actually an NSA document :-) */
395#define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L 399#define OBJ_dsaWithSHA1_2 OBJ_algorithm,27L
@@ -654,21 +658,280 @@ extern "C" {
654#define LN_rc5_ofb64 "rc5-ofb" 658#define LN_rc5_ofb64 "rc5-ofb"
655#define NID_rc5_ofb64 123 659#define NID_rc5_ofb64 123
656 660
657#include "bio.h" 661#define SN_rle_compression "RLE"
658#include "asn1.h" 662#define LN_rle_compression "run length compression"
663#define NID_rle_compression 124
664#define OBJ_rle_compression 1L,1L,1L,1L,666L.1L
665
666#define SN_zlib_compression "ZLIB"
667#define LN_zlib_compression "zlib compression"
668#define NID_zlib_compression 125
669#define OBJ_zlib_compression 1L,1L,1L,1L,666L.2L
670
671#define SN_ext_key_usage "extendedKeyUsage"
672#define LN_ext_key_usage "X509v3 Extended Key Usage"
673#define NID_ext_key_usage 126
674#define OBJ_ext_key_usage OBJ_ld_ce,37
675
676#define SN_id_pkix "PKIX"
677#define NID_id_pkix 127
678#define OBJ_id_pkix 1L,3L,6L,1L,5L,5L,7L
679
680#define SN_id_kp "id-kp"
681#define NID_id_kp 128
682#define OBJ_id_kp OBJ_id_pkix,3L
683
684/* PKIX extended key usage OIDs */
685
686#define SN_server_auth "serverAuth"
687#define LN_server_auth "TLS Web Server Authentication"
688#define NID_server_auth 129
689#define OBJ_server_auth OBJ_id_kp,1L
690
691#define SN_client_auth "clientAuth"
692#define LN_client_auth "TLS Web Client Authentication"
693#define NID_client_auth 130
694#define OBJ_client_auth OBJ_id_kp,2L
695
696#define SN_code_sign "codeSigning"
697#define LN_code_sign "Code Signing"
698#define NID_code_sign 131
699#define OBJ_code_sign OBJ_id_kp,3L
700
701#define SN_email_protect "emailProtection"
702#define LN_email_protect "E-mail Protection"
703#define NID_email_protect 132
704#define OBJ_email_protect OBJ_id_kp,4L
705
706#define SN_time_stamp "timeStamping"
707#define LN_time_stamp "Time Stamping"
708#define NID_time_stamp 133
709#define OBJ_time_stamp OBJ_id_kp,8L
710
711/* Additional extended key usage OIDs: Microsoft */
712
713#define SN_ms_code_ind "msCodeInd"
714#define LN_ms_code_ind "Microsoft Individual Code Signing"
715#define NID_ms_code_ind 134
716#define OBJ_ms_code_ind 1L,3L,6L,1L,4L,1L,311L,2L,1L,21L
717
718#define SN_ms_code_com "msCodeCom"
719#define LN_ms_code_com "Microsoft Commercial Code Signing"
720#define NID_ms_code_com 135
721#define OBJ_ms_code_com 1L,3L,6L,1L,4L,1L,311L,2L,1L,22L
722
723#define SN_ms_ctl_sign "msCTLSign"
724#define LN_ms_ctl_sign "Microsoft Trust List Signing"
725#define NID_ms_ctl_sign 136
726#define OBJ_ms_ctl_sign 1L,3L,6L,1L,4L,1L,311L,10L,3L,1L
727
728#define SN_ms_sgc "msSGC"
729#define LN_ms_sgc "Microsoft Server Gated Crypto"
730#define NID_ms_sgc 137
731#define OBJ_ms_sgc 1L,3L,6L,1L,4L,1L,311L,10L,3L,3L
732
733#define SN_ms_efs "msEFS"
734#define LN_ms_efs "Microsoft Encrypted File System"
735#define NID_ms_efs 138
736#define OBJ_ms_efs 1L,3L,6L,1L,4L,1L,311L,10L,3L,4L
737
738/* Addidional usage: Netscape */
739
740#define SN_ns_sgc "nsSGC"
741#define LN_ns_sgc "Netscape Server Gated Crypto"
742#define NID_ns_sgc 139
743#define OBJ_ns_sgc OBJ_netscape,4L,1L
744
745#define SN_delta_crl "deltaCRL"
746#define LN_delta_crl "X509v3 Delta CRL Indicator"
747#define NID_delta_crl 140
748#define OBJ_delta_crl OBJ_ld_ce,27L
749
750#define SN_crl_reason "CRLReason"
751#define LN_crl_reason "CRL Reason Code"
752#define NID_crl_reason 141
753#define OBJ_crl_reason OBJ_ld_ce,21L
754
755#define SN_invalidity_date "invalidityDate"
756#define LN_invalidity_date "Invalidity Date"
757#define NID_invalidity_date 142
758#define OBJ_invalidity_date OBJ_ld_ce,24L
759
760#define SN_sxnet "SXNetID"
761#define LN_sxnet "Strong Extranet ID"
762#define NID_sxnet 143
763#define OBJ_sxnet 1L,3L,101L,1L,4L,1L
764
765/* PKCS12 and related OBJECT IDENTIFIERS */
766
767#define OBJ_pkcs12 OBJ_pkcs,12L
768#define OBJ_pkcs12_pbeids OBJ_pkcs12, 1
769
770#define LN_pbe_WithSHA1And128BitRC4 "pbeWithSHA1And128BitRC4"
771#define NID_pbe_WithSHA1And128BitRC4 144
772#define OBJ_pbe_WithSHA1And128BitRC4 OBJ_pkcs12_pbeids, 1L
773
774#define LN_pbe_WithSHA1And40BitRC4 "pbeWithSHA1And40BitRC4"
775#define NID_pbe_WithSHA1And40BitRC4 145
776#define OBJ_pbe_WithSHA1And40BitRC4 OBJ_pkcs12_pbeids, 2L
777
778#define LN_pbe_WithSHA1And3_Key_TripleDES_CBC "pbeWithSHA1And3-KeyTripleDES-CBC"
779#define NID_pbe_WithSHA1And3_Key_TripleDES_CBC 146
780#define OBJ_pbe_WithSHA1And3_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 3L
781
782#define LN_pbe_WithSHA1And2_Key_TripleDES_CBC "pbeWithSHA1And2-KeyTripleDES-CBC"
783#define NID_pbe_WithSHA1And2_Key_TripleDES_CBC 147
784#define OBJ_pbe_WithSHA1And2_Key_TripleDES_CBC OBJ_pkcs12_pbeids, 4L
785
786#define LN_pbe_WithSHA1And128BitRC2_CBC "pbeWithSHA1And128BitRC2-CBC"
787#define NID_pbe_WithSHA1And128BitRC2_CBC 148
788#define OBJ_pbe_WithSHA1And128BitRC2_CBC OBJ_pkcs12_pbeids, 5L
789
790#define LN_pbe_WithSHA1And40BitRC2_CBC "pbeWithSHA1And40BitRC2-CBC"
791#define NID_pbe_WithSHA1And40BitRC2_CBC 149
792#define OBJ_pbe_WithSHA1And40BitRC2_CBC OBJ_pkcs12_pbeids, 6L
793
794#define OBJ_pkcs12_Version1 OBJ_pkcs12, 10L
795
796#define OBJ_pkcs12_BagIds OBJ_pkcs12_Version1, 1L
797
798#define LN_keyBag "keyBag"
799#define NID_keyBag 150
800#define OBJ_keyBag OBJ_pkcs12_BagIds, 1L
801
802#define LN_pkcs8ShroudedKeyBag "pkcs8ShroudedKeyBag"
803#define NID_pkcs8ShroudedKeyBag 151
804#define OBJ_pkcs8ShroudedKeyBag OBJ_pkcs12_BagIds, 2L
805
806#define LN_certBag "certBag"
807#define NID_certBag 152
808#define OBJ_certBag OBJ_pkcs12_BagIds, 3L
809
810#define LN_crlBag "crlBag"
811#define NID_crlBag 153
812#define OBJ_crlBag OBJ_pkcs12_BagIds, 4L
813
814#define LN_secretBag "secretBag"
815#define NID_secretBag 154
816#define OBJ_secretBag OBJ_pkcs12_BagIds, 5L
817
818#define LN_safeContentsBag "safeContentsBag"
819#define NID_safeContentsBag 155
820#define OBJ_safeContentsBag OBJ_pkcs12_BagIds, 6L
821
822#define LN_friendlyName "friendlyName"
823#define NID_friendlyName 156
824#define OBJ_friendlyName OBJ_pkcs9, 20L
825
826#define LN_localKeyID "localKeyID"
827#define NID_localKeyID 157
828#define OBJ_localKeyID OBJ_pkcs9, 21L
829
830#define OBJ_certTypes OBJ_pkcs9, 22L
831
832#define LN_x509Certificate "x509Certificate"
833#define NID_x509Certificate 158
834#define OBJ_x509Certificate OBJ_certTypes, 1L
835
836#define LN_sdsiCertificate "sdsiCertificate"
837#define NID_sdsiCertificate 159
838#define OBJ_sdsiCertificate OBJ_certTypes, 2L
839
840#define OBJ_crlTypes OBJ_pkcs9, 23L
841
842#define LN_x509Crl "x509Crl"
843#define NID_x509Crl 160
844#define OBJ_x509Crl OBJ_crlTypes, 1L
845
846/* PKCS#5 v2 OIDs */
847
848#define LN_pbes2 "PBES2"
849#define NID_pbes2 161
850#define OBJ_pbes2 OBJ_pkcs,5L,13L
851
852#define LN_pbmac1 "PBMAC1"
853#define NID_pbmac1 162
854#define OBJ_pbmac1 OBJ_pkcs,5L,14L
855
856#define LN_hmacWithSHA1 "hmacWithSHA1"
857#define NID_hmacWithSHA1 163
858#define OBJ_hmacWithSHA1 OBJ_rsadsi,2L,7L
859
860/* Policy Qualifier Ids */
861
862#define LN_id_qt_cps "Policy Qualifier CPS"
863#define SN_id_qt_cps "id-qt-cps"
864#define NID_id_qt_cps 164
865#define OBJ_id_qt_cps OBJ_id_pkix,2L,1L
866
867#define LN_id_qt_unotice "Policy Qualifier User Notice"
868#define SN_id_qt_unotice "id-qt-unotice"
869#define NID_id_qt_unotice 165
870#define OBJ_id_qt_unotice OBJ_id_pkix,2L,2L
871
872#define SN_rc2_64_cbc "RC2-64-CBC"
873#define LN_rc2_64_cbc "rc2-64-cbc"
874#define NID_rc2_64_cbc 166
875
876#define SN_SMIMECapabilities "SMIME-CAPS"
877#define LN_SMIMECapabilities "S/MIME Capabilities"
878#define NID_SMIMECapabilities 167
879#define OBJ_SMIMECapabilities OBJ_id_pkcs9,15L
880
881#define LN_pbeWithMD2AndRC2_CBC "pbeWithMD2AndRC2-CBC"
882#define NID_pbeWithMD2AndRC2_CBC 168
883#define OBJ_pbeWithMD2AndRC2_CBC OBJ_pkcs,5L,4L
884
885#define LN_pbeWithMD5AndRC2_CBC "pbeWithMD5AndRC2-CBC"
886#define NID_pbeWithMD5AndRC2_CBC 169
887#define OBJ_pbeWithMD5AndRC2_CBC OBJ_pkcs,5L,6L
888
889#define LN_pbeWithSHA1AndDES_CBC "pbeWithSHA1AndDES-CBC"
890#define NID_pbeWithSHA1AndDES_CBC 170
891#define OBJ_pbeWithSHA1AndDES_CBC OBJ_pkcs,5L,10L
892
893#include <openssl/bio.h>
894#include <openssl/asn1.h>
895
896#define OBJ_NAME_TYPE_UNDEF 0x00
897#define OBJ_NAME_TYPE_MD_METH 0x01
898#define OBJ_NAME_TYPE_CIPHER_METH 0x02
899#define OBJ_NAME_TYPE_PKEY_METH 0x03
900#define OBJ_NAME_TYPE_COMP_METH 0x04
901#define OBJ_NAME_TYPE_NUM 0x05
902
903#define OBJ_NAME_ALIAS 0x8000
904
905
906typedef struct obj_name_st
907 {
908 int type;
909 int alias;
910 const char *name;
911 const char *data;
912 } OBJ_NAME;
659 913
660#define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c) 914#define OBJ_create_and_add_object(a,b,c) OBJ_create(a,b,c)
661 915
662#ifndef NOPROTO 916
917int OBJ_NAME_init(void);
918int OBJ_NAME_new_index(unsigned long (*hash_func)(),int (*cmp_func)(),
919 void (*free_func)());
920const char *OBJ_NAME_get(const char *name,int type);
921int OBJ_NAME_add(const char *name,int type,const char *data);
922int OBJ_NAME_remove(const char *name,int type);
923void OBJ_NAME_cleanup(int type); /* -1 for everything */
663 924
664ASN1_OBJECT * OBJ_dup(ASN1_OBJECT *o); 925ASN1_OBJECT * OBJ_dup(ASN1_OBJECT *o);
665ASN1_OBJECT * OBJ_nid2obj(int n); 926ASN1_OBJECT * OBJ_nid2obj(int n);
666char * OBJ_nid2ln(int n); 927const char * OBJ_nid2ln(int n);
667char * OBJ_nid2sn(int n); 928const char * OBJ_nid2sn(int n);
668int OBJ_obj2nid(ASN1_OBJECT *o); 929int OBJ_obj2nid(ASN1_OBJECT *o);
930ASN1_OBJECT * OBJ_txt2obj(const char *s, int no_name);
931int OBJ_obj2txt(char *buf, int buf_len, ASN1_OBJECT *a, int no_name);
669int OBJ_txt2nid(char *s); 932int OBJ_txt2nid(char *s);
670int OBJ_ln2nid(char *s); 933int OBJ_ln2nid(const char *s);
671int OBJ_sn2nid(char *s); 934int OBJ_sn2nid(const char *s);
672int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b); 935int OBJ_cmp(ASN1_OBJECT *a,ASN1_OBJECT *b);
673char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)()); 936char * OBJ_bsearch(char *key,char *base,int num,int size,int (*cmp)());
674 937
@@ -680,30 +943,11 @@ int OBJ_create(char *oid,char *sn,char *ln);
680void OBJ_cleanup(void ); 943void OBJ_cleanup(void );
681int OBJ_create_objects(BIO *in); 944int OBJ_create_objects(BIO *in);
682 945
683#else
684
685ASN1_OBJECT * OBJ_dup();
686ASN1_OBJECT * OBJ_nid2obj();
687char * OBJ_nid2ln();
688char * OBJ_nid2sn();
689int OBJ_obj2nid();
690int OBJ_txt2nid();
691int OBJ_ln2nid();
692int OBJ_sn2nid();
693int OBJ_cmp();
694char * OBJ_bsearch();
695
696void ERR_load_OBJ_strings();
697
698int OBJ_new_nid();
699int OBJ_add_object();
700int OBJ_create();
701void OBJ_cleanup();
702int OBJ_create_objects();
703
704#endif
705
706/* BEGIN ERROR CODES */ 946/* BEGIN ERROR CODES */
947/* The following lines are auto generated by the script mkerr.pl. Any changes
948 * made after this point may be overwritten when the script is next run.
949 */
950
707/* Error codes for the OBJ functions. */ 951/* Error codes for the OBJ functions. */
708 952
709/* Function codes. */ 953/* Function codes. */
@@ -716,7 +960,7 @@ int OBJ_create_objects();
716/* Reason codes. */ 960/* Reason codes. */
717#define OBJ_R_MALLOC_FAILURE 100 961#define OBJ_R_MALLOC_FAILURE 100
718#define OBJ_R_UNKNOWN_NID 101 962#define OBJ_R_UNKNOWN_NID 101
719 963
720#ifdef __cplusplus 964#ifdef __cplusplus
721} 965}
722#endif 966#endif