projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various clarifications to extension docs: change the name of literal
[oweals/openssl.git]
/
crypto
/
x509v3
/
v3_skey.c
diff --git
a/crypto/x509v3/v3_skey.c
b/crypto/x509v3/v3_skey.c
index 3994c79d670e9e79d5819d0b3099228389fa74d5..cca2eb9aef42ff980abfbe0e21322202c937f546 100644
(file)
--- a/
crypto/x509v3/v3_skey.c
+++ b/
crypto/x509v3/v3_skey.c
@@
-56,24
+56,13
@@
*
*/
*
*/
+
#include <stdio.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
-#include "x509v3.h"
-
-#ifndef NOPROTO
+#include "cryptlib.h"
+#include <openssl/x509v3.h>
+
static ASN1_OCTET_STRING *octet_string_new(void);
static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str);
static ASN1_OCTET_STRING *octet_string_new(void);
static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, char *str);
-#else
-static ASN1_OCTET_STRING *s2i_skey_id();
-static ASN1_OCTET_STRING *octet_string_new();
-#endif
-
X509V3_EXT_METHOD v3_skey_id = {
NID_subject_key_identifier, 0,
(X509V3_EXT_NEW)octet_string_new, ASN1_STRING_free,
X509V3_EXT_METHOD v3_skey_id = {
NID_subject_key_identifier, 0,
(X509V3_EXT_NEW)octet_string_new, ASN1_STRING_free,
@@
-81,7
+70,7
@@
NID_subject_key_identifier, 0,
i2d_ASN1_OCTET_STRING,
(X509V3_EXT_I2S)i2s_ASN1_OCTET_STRING,
(X509V3_EXT_S2I)s2i_skey_id,
i2d_ASN1_OCTET_STRING,
(X509V3_EXT_I2S)i2s_ASN1_OCTET_STRING,
(X509V3_EXT_S2I)s2i_skey_id,
-NULL, NULL, NULL, NULL};
+NULL, NULL, NULL, NULL
, NULL
};
static ASN1_OCTET_STRING *octet_string_new(void)
static ASN1_OCTET_STRING *octet_string_new(void)
@@
-89,17
+78,14
@@
static ASN1_OCTET_STRING *octet_string_new(void)
return ASN1_OCTET_STRING_new();
}
return ASN1_OCTET_STRING_new();
}
-char *i2s_ASN1_OCTET_STRING(method, oct)
-X509V3_EXT_METHOD *method;
-ASN1_OCTET_STRING *oct;
+char *i2s_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
+ ASN1_OCTET_STRING *oct)
{
return hex_to_string(oct->data, oct->length);
}
{
return hex_to_string(oct->data, oct->length);
}
-ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(method, ctx, str)
-X509V3_EXT_METHOD *method;
-X509V3_CTX *ctx;
-char *str;
+ASN1_OCTET_STRING *s2i_ASN1_OCTET_STRING(X509V3_EXT_METHOD *method,
+ X509V3_CTX *ctx, char *str)
{
ASN1_OCTET_STRING *oct;
long length;
{
ASN1_OCTET_STRING *oct;
long length;
@@
-120,16
+106,14
@@
char *str;
}
}
-ASN1_OCTET_STRING *s2i_skey_id(method, ctx, str)
-X509V3_EXT_METHOD *method;
-X509V3_CTX *ctx;
-char *str;
+static ASN1_OCTET_STRING *s2i_skey_id(X509V3_EXT_METHOD *method,
+ X509V3_CTX *ctx, char *str)
{
ASN1_OCTET_STRING *oct;
ASN1_BIT_STRING *pk;
unsigned char pkey_dig[EVP_MAX_MD_SIZE];
EVP_MD_CTX md;
{
ASN1_OCTET_STRING *oct;
ASN1_BIT_STRING *pk;
unsigned char pkey_dig[EVP_MAX_MD_SIZE];
EVP_MD_CTX md;
- int diglen;
+
unsigned
int diglen;
if(strcmp(str, "hash")) return s2i_ASN1_OCTET_STRING(method, ctx, str);
if(strcmp(str, "hash")) return s2i_ASN1_OCTET_STRING(method, ctx, str);