summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/objects
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/objects')
-rw-r--r--src/lib/libcrypto/objects/o_names.c7
-rw-r--r--src/lib/libcrypto/objects/obj_dat.c12
-rw-r--r--src/lib/libcrypto/objects/obj_err.c4
-rw-r--r--src/lib/libcrypto/objects/obj_mac.num18
-rw-r--r--src/lib/libcrypto/objects/objects.h2
-rw-r--r--src/lib/libcrypto/objects/objects.txt22
6 files changed, 58 insertions, 7 deletions
diff --git a/src/lib/libcrypto/objects/o_names.c b/src/lib/libcrypto/objects/o_names.c
index b4453b4a98..28c9370ca3 100644
--- a/src/lib/libcrypto/objects/o_names.c
+++ b/src/lib/libcrypto/objects/o_names.c
@@ -2,6 +2,7 @@
2#include <stdlib.h> 2#include <stdlib.h>
3#include <string.h> 3#include <string.h>
4 4
5#include <openssl/err.h>
5#include <openssl/lhash.h> 6#include <openssl/lhash.h>
6#include <openssl/objects.h> 7#include <openssl/objects.h>
7#include <openssl/safestack.h> 8#include <openssl/safestack.h>
@@ -80,7 +81,11 @@ int OBJ_NAME_new_index(unsigned long (*hash_func)(const char *),
80 MemCheck_off(); 81 MemCheck_off();
81 name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS)); 82 name_funcs = OPENSSL_malloc(sizeof(NAME_FUNCS));
82 MemCheck_on(); 83 MemCheck_on();
83 if (!name_funcs) return(0); 84 if (!name_funcs)
85 {
86 OBJerr(OBJ_F_OBJ_NAME_NEW_INDEX,ERR_R_MALLOC_FAILURE);
87 return(0);
88 }
84 name_funcs->hash_func = lh_strhash; 89 name_funcs->hash_func = lh_strhash;
85 name_funcs->cmp_func = OPENSSL_strcmp; 90 name_funcs->cmp_func = OPENSSL_strcmp;
86 name_funcs->free_func = 0; /* NULL is often declared to 91 name_funcs->free_func = 0; /* NULL is often declared to
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c
index 4534dc0985..f549d078ef 100644
--- a/src/lib/libcrypto/objects/obj_dat.c
+++ b/src/lib/libcrypto/objects/obj_dat.c
@@ -236,13 +236,13 @@ int OBJ_add_object(const ASN1_OBJECT *obj)
236 if (added == NULL) 236 if (added == NULL)
237 if (!init_added()) return(0); 237 if (!init_added()) return(0);
238 if ((o=OBJ_dup(obj)) == NULL) goto err; 238 if ((o=OBJ_dup(obj)) == NULL) goto err;
239 if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err; 239 if (!(ao[ADDED_NID]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2;
240 if ((o->length != 0) && (obj->data != NULL)) 240 if ((o->length != 0) && (obj->data != NULL))
241 ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); 241 if (!(ao[ADDED_DATA]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2;
242 if (o->sn != NULL) 242 if (o->sn != NULL)
243 ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); 243 if (!(ao[ADDED_SNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2;
244 if (o->ln != NULL) 244 if (o->ln != NULL)
245 ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)); 245 if (!(ao[ADDED_LNAME]=(ADDED_OBJ *)OPENSSL_malloc(sizeof(ADDED_OBJ)))) goto err2;
246 246
247 for (i=ADDED_DATA; i<=ADDED_NID; i++) 247 for (i=ADDED_DATA; i<=ADDED_NID; i++)
248 { 248 {
@@ -260,6 +260,8 @@ int OBJ_add_object(const ASN1_OBJECT *obj)
260 ASN1_OBJECT_FLAG_DYNAMIC_DATA); 260 ASN1_OBJECT_FLAG_DYNAMIC_DATA);
261 261
262 return(o->nid); 262 return(o->nid);
263err2:
264 OBJerr(OBJ_F_OBJ_ADD_OBJECT,ERR_R_MALLOC_FAILURE);
263err: 265err:
264 for (i=ADDED_DATA; i<=ADDED_NID; i++) 266 for (i=ADDED_DATA; i<=ADDED_NID; i++)
265 if (ao[i] != NULL) OPENSSL_free(ao[i]); 267 if (ao[i] != NULL) OPENSSL_free(ao[i]);
@@ -648,7 +650,7 @@ int OBJ_create(const char *oid, const char *sn, const char *ln)
648 650
649 if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL) 651 if ((buf=(unsigned char *)OPENSSL_malloc(i)) == NULL)
650 { 652 {
651 OBJerr(OBJ_F_OBJ_CREATE,OBJ_R_MALLOC_FAILURE); 653 OBJerr(OBJ_F_OBJ_CREATE,ERR_R_MALLOC_FAILURE);
652 return(0); 654 return(0);
653 } 655 }
654 i=a2d_ASN1_OBJECT(buf,i,oid,-1); 656 i=a2d_ASN1_OBJECT(buf,i,oid,-1);
diff --git a/src/lib/libcrypto/objects/obj_err.c b/src/lib/libcrypto/objects/obj_err.c
index 80ab6855af..2b5f43e3cc 100644
--- a/src/lib/libcrypto/objects/obj_err.c
+++ b/src/lib/libcrypto/objects/obj_err.c
@@ -1,6 +1,6 @@
1/* crypto/objects/obj_err.c */ 1/* crypto/objects/obj_err.c */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999-2004 The OpenSSL Project. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
@@ -66,8 +66,10 @@
66#ifndef OPENSSL_NO_ERR 66#ifndef OPENSSL_NO_ERR
67static ERR_STRING_DATA OBJ_str_functs[]= 67static ERR_STRING_DATA OBJ_str_functs[]=
68 { 68 {
69{ERR_PACK(0,OBJ_F_OBJ_ADD_OBJECT,0), "OBJ_add_object"},
69{ERR_PACK(0,OBJ_F_OBJ_CREATE,0), "OBJ_create"}, 70{ERR_PACK(0,OBJ_F_OBJ_CREATE,0), "OBJ_create"},
70{ERR_PACK(0,OBJ_F_OBJ_DUP,0), "OBJ_dup"}, 71{ERR_PACK(0,OBJ_F_OBJ_DUP,0), "OBJ_dup"},
72{ERR_PACK(0,OBJ_F_OBJ_NAME_NEW_INDEX,0), "OBJ_NAME_new_index"},
71{ERR_PACK(0,OBJ_F_OBJ_NID2LN,0), "OBJ_nid2ln"}, 73{ERR_PACK(0,OBJ_F_OBJ_NID2LN,0), "OBJ_nid2ln"},
72{ERR_PACK(0,OBJ_F_OBJ_NID2OBJ,0), "OBJ_nid2obj"}, 74{ERR_PACK(0,OBJ_F_OBJ_NID2OBJ,0), "OBJ_nid2obj"},
73{ERR_PACK(0,OBJ_F_OBJ_NID2SN,0), "OBJ_nid2sn"}, 75{ERR_PACK(0,OBJ_F_OBJ_NID2SN,0), "OBJ_nid2sn"},
diff --git a/src/lib/libcrypto/objects/obj_mac.num b/src/lib/libcrypto/objects/obj_mac.num
index 9838072b65..0e64a929ba 100644
--- a/src/lib/libcrypto/objects/obj_mac.num
+++ b/src/lib/libcrypto/objects/obj_mac.num
@@ -647,3 +647,21 @@ joint_iso_itu_t 646
647international_organizations 647 647international_organizations 647
648ms_smartcard_login 648 648ms_smartcard_login 648
649ms_upn 649 649ms_upn 649
650aes_128_cfb1 650
651aes_192_cfb1 651
652aes_256_cfb1 652
653aes_128_cfb8 653
654aes_192_cfb8 654
655aes_256_cfb8 655
656des_cfb1 656
657des_cfb8 657
658des_ede3_cfb1 658
659des_ede3_cfb8 659
660streetAddress 660
661postalCode 661
662id_ppl 662
663proxyCertInfo 663
664id_ppl_anyLanguage 664
665id_ppl_inheritAll 665
666id_ppl_independent 666
667Independent 667
diff --git a/src/lib/libcrypto/objects/objects.h b/src/lib/libcrypto/objects/objects.h
index de10532813..f859d859b8 100644
--- a/src/lib/libcrypto/objects/objects.h
+++ b/src/lib/libcrypto/objects/objects.h
@@ -1026,8 +1026,10 @@ void ERR_load_OBJ_strings(void);
1026/* Error codes for the OBJ functions. */ 1026/* Error codes for the OBJ functions. */
1027 1027
1028/* Function codes. */ 1028/* Function codes. */
1029#define OBJ_F_OBJ_ADD_OBJECT 105
1029#define OBJ_F_OBJ_CREATE 100 1030#define OBJ_F_OBJ_CREATE 100
1030#define OBJ_F_OBJ_DUP 101 1031#define OBJ_F_OBJ_DUP 101
1032#define OBJ_F_OBJ_NAME_NEW_INDEX 106
1031#define OBJ_F_OBJ_NID2LN 102 1033#define OBJ_F_OBJ_NID2LN 102
1032#define OBJ_F_OBJ_NID2OBJ 103 1034#define OBJ_F_OBJ_NID2OBJ 103
1033#define OBJ_F_OBJ_NID2SN 104 1035#define OBJ_F_OBJ_NID2SN 104
diff --git a/src/lib/libcrypto/objects/objects.txt b/src/lib/libcrypto/objects/objects.txt
index 3ba11f65cc..50e9031e61 100644
--- a/src/lib/libcrypto/objects/objects.txt
+++ b/src/lib/libcrypto/objects/objects.txt
@@ -312,6 +312,7 @@ id-pkix 9 : id-pda
312id-pkix 10 : id-aca 312id-pkix 10 : id-aca
313id-pkix 11 : id-qcs 313id-pkix 11 : id-qcs
314id-pkix 12 : id-cct 314id-pkix 12 : id-cct
315id-pkix 21 : id-ppl
315id-pkix 48 : id-ad 316id-pkix 48 : id-ad
316 317
317# PKIX Modules 318# PKIX Modules
@@ -346,6 +347,7 @@ id-pe 9 : sbqp-routerIdentifier
346id-pe 10 : ac-proxying 347id-pe 10 : ac-proxying
347!Cname sinfo-access 348!Cname sinfo-access
348id-pe 11 : subjectInfoAccess : Subject Information Access 349id-pe 11 : subjectInfoAccess : Subject Information Access
350id-pe 14 : proxyCertInfo : Proxy Certificate Information
349 351
350# PKIX policyQualifiers for Internet policy qualifiers 352# PKIX policyQualifiers for Internet policy qualifiers
351id-qt 1 : id-qt-cps : Policy Qualifier CPS 353id-qt 1 : id-qt-cps : Policy Qualifier CPS
@@ -461,6 +463,11 @@ id-cct 1 : id-cct-crs
461id-cct 2 : id-cct-PKIData 463id-cct 2 : id-cct-PKIData
462id-cct 3 : id-cct-PKIResponse 464id-cct 3 : id-cct-PKIResponse
463 465
466# Predefined Proxy Certificate policy languages
467id-ppl 0 : id-ppl-anyLanguage : Any language
468id-ppl 1 : id-ppl-inheritAll : Inherit all
469id-ppl 2 : id-ppl-independent : Independent
470
464# access descriptors for authority info access extension 471# access descriptors for authority info access extension
465!Cname ad-OCSP 472!Cname ad-OCSP
466id-ad 1 : OCSP : OCSP 473id-ad 1 : OCSP : OCSP
@@ -536,10 +543,12 @@ X509 5 : : serialNumber
536X509 6 : C : countryName 543X509 6 : C : countryName
537X509 7 : L : localityName 544X509 7 : L : localityName
538X509 8 : ST : stateOrProvinceName 545X509 8 : ST : stateOrProvinceName
546X509 9 : : streetAddress
539X509 10 : O : organizationName 547X509 10 : O : organizationName
540X509 11 : OU : organizationalUnitName 548X509 11 : OU : organizationalUnitName
541X509 12 : : title 549X509 12 : : title
542X509 13 : : description 550X509 13 : : description
551X509 17 : : postalCode
543X509 41 : name : name 552X509 41 : name : name
544X509 42 : GN : givenName 553X509 42 : GN : givenName
545X509 43 : : initials 554X509 43 : : initials
@@ -681,6 +690,19 @@ aes 43 : AES-256-OFB : aes-256-ofb
681!Cname aes-256-cfb128 690!Cname aes-256-cfb128
682aes 44 : AES-256-CFB : aes-256-cfb 691aes 44 : AES-256-CFB : aes-256-cfb
683 692
693# There are no OIDs for these modes...
694
695 : AES-128-CFB1 : aes-128-cfb1
696 : AES-192-CFB1 : aes-192-cfb1
697 : AES-256-CFB1 : aes-256-cfb1
698 : AES-128-CFB8 : aes-128-cfb8
699 : AES-192-CFB8 : aes-192-cfb8
700 : AES-256-CFB8 : aes-256-cfb8
701 : DES-CFB1 : des-cfb1
702 : DES-CFB8 : des-cfb8
703 : DES-EDE3-CFB1 : des-ede3-cfb1
704 : DES-EDE3-CFB8 : des-ede3-cfb8
705
684# Hold instruction CRL entry extension 706# Hold instruction CRL entry extension
685!Cname hold-instruction-code 707!Cname hold-instruction-code
686id-ce 23 : holdInstructionCode : Hold Instruction Code 708id-ce 23 : holdInstructionCode : Hold Instruction Code