projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Constify version strings and some structures.
[openssl.git]
/
crypto
/
x509v3
/
v3_enum.c
diff --git
a/crypto/x509v3/v3_enum.c
b/crypto/x509v3/v3_enum.c
index e68e04f401d57d6cc4860a8e6bb68560c17ffbeb..a236cb22e158f7ae66f72cf67d4dad14a3b50703 100644
(file)
--- a/
crypto/x509v3/v3_enum.c
+++ b/
crypto/x509v3/v3_enum.c
@@
-60,8
+60,6
@@
#include "cryptlib.h"
#include <openssl/x509v3.h>
#include "cryptlib.h"
#include <openssl/x509v3.h>
-static ASN1_ENUMERATED *asn1_enumerated_new();
-
static ENUMERATED_NAMES crl_reasons[] = {
{0, "Unspecified", "unspecified"},
{1, "Key Compromise", "keyCompromise"},
static ENUMERATED_NAMES crl_reasons[] = {
{0, "Unspecified", "unspecified"},
{1, "Key Compromise", "keyCompromise"},
@@
-74,20
+72,14
@@
static ENUMERATED_NAMES crl_reasons[] = {
{-1, NULL, NULL}
};
{-1, NULL, NULL}
};
-X509V3_EXT_METHOD v3_crl_reason = {
-NID_crl_reason, 0,
-(X509V3_EXT_NEW)asn1_enumerated_new, ASN1_STRING_free,
-(X509V3_EXT_D2I)d2i_ASN1_ENUMERATED,
-i2d_ASN1_ENUMERATED,
+const X509V3_EXT_METHOD v3_crl_reason = {
+NID_crl_reason, 0, ASN1_ITEM_ref(ASN1_ENUMERATED),
+0,0,0,0,
(X509V3_EXT_I2S)i2s_ASN1_ENUMERATED_TABLE,
(X509V3_EXT_I2S)i2s_ASN1_ENUMERATED_TABLE,
-
(X509V3_EXT_S2I)NULL
,
-NULL, NULL, NULL, NULL, (char *)crl_reasons};
-
+
0
,
+0,0,0,0,
+crl_reasons};
-static ASN1_ENUMERATED *asn1_enumerated_new(void)
-{
- return ASN1_ENUMERATED_new();
-}
char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method,
ASN1_ENUMERATED *e)
char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method,
ASN1_ENUMERATED *e)
@@
-95,7
+87,7
@@
char *i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method,
ENUMERATED_NAMES *enam;
long strval;
strval = ASN1_ENUMERATED_get(e);
ENUMERATED_NAMES *enam;
long strval;
strval = ASN1_ENUMERATED_get(e);
- for(enam =
(ENUMERATED_NAMES *)
method->usr_data; enam->lname; enam++) {
+ for(enam =
method->usr_data; enam->lname; enam++) {
if(strval == enam->bitnum) return BUF_strdup(enam->lname);
}
return i2s_ASN1_ENUMERATED(method, e);
if(strval == enam->bitnum) return BUF_strdup(enam->lname);
}
return i2s_ASN1_ENUMERATED(method, e);