Remove unneeded CONFIG_INTERNAL_X509 and NEED_SHA256 defines
This commit is contained in:
parent
be473f3f09
commit
1a70777868
6 changed files with 2 additions and 71 deletions
|
@ -15,9 +15,6 @@
|
|||
#include "includes.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef CONFIG_INTERNAL_X509
|
||||
|
||||
#include "asn1.h"
|
||||
|
||||
int asn1_get_next(const u8 *buf, size_t len, struct asn1_hdr *hdr)
|
||||
|
@ -213,5 +210,3 @@ unsigned long asn1_bit_string_to_long(const u8 *buf, size_t len)
|
|||
|
||||
return val;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INTERNAL_X509 */
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
#include "includes.h"
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef CONFIG_INTERNAL_X509
|
||||
|
||||
#include "crypto/crypto.h"
|
||||
#include "asn1.h"
|
||||
#include "x509v3.h"
|
||||
|
@ -1745,18 +1742,12 @@ skip_digest_oid:
|
|||
hash, hash_len);
|
||||
break;
|
||||
case 11: /* sha256WithRSAEncryption */
|
||||
#ifdef NEED_SHA256
|
||||
sha256_vector(1, &cert->tbs_cert_start, &cert->tbs_cert_len,
|
||||
hash);
|
||||
hash_len = 32;
|
||||
wpa_hexdump(MSG_MSGDUMP, "X509: Certificate hash (SHA256)",
|
||||
hash, hash_len);
|
||||
break;
|
||||
#else /* NEED_SHA256 */
|
||||
wpa_printf(MSG_INFO, "X509: SHA256 support disabled");
|
||||
os_free(data);
|
||||
return -1;
|
||||
#endif /* NEED_SHA256 */
|
||||
case 2: /* md2WithRSAEncryption */
|
||||
case 12: /* sha384WithRSAEncryption */
|
||||
case 13: /* sha512WithRSAEncryption */
|
||||
|
@ -1970,5 +1961,3 @@ int x509_certificate_self_signed(struct x509_certificate *cert)
|
|||
{
|
||||
return x509_name_compare(&cert->issuer, &cert->subject) == 0;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INTERNAL_X509 */
|
||||
|
|
|
@ -99,8 +99,6 @@ enum {
|
|||
X509_VALIDATE_UNKNOWN_CA
|
||||
};
|
||||
|
||||
#ifdef CONFIG_INTERNAL_X509
|
||||
|
||||
void x509_certificate_free(struct x509_certificate *cert);
|
||||
struct x509_certificate * x509_certificate_parse(const u8 *buf, size_t len);
|
||||
void x509_name_string(struct x509_name *name, char *buf, size_t len);
|
||||
|
@ -116,49 +114,4 @@ x509_certificate_get_subject(struct x509_certificate *chain,
|
|||
struct x509_name *name);
|
||||
int x509_certificate_self_signed(struct x509_certificate *cert);
|
||||
|
||||
#else /* CONFIG_INTERNAL_X509 */
|
||||
|
||||
static inline void x509_certificate_free(struct x509_certificate *cert)
|
||||
{
|
||||
}
|
||||
|
||||
static inline struct x509_certificate *
|
||||
x509_certificate_parse(const u8 *buf, size_t len)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void x509_name_string(struct x509_name *name, char *buf,
|
||||
size_t len)
|
||||
{
|
||||
if (len)
|
||||
buf[0] = '\0';
|
||||
}
|
||||
|
||||
static inline void x509_certificate_chain_free(struct x509_certificate *cert)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int
|
||||
x509_certificate_chain_validate(struct x509_certificate *trusted,
|
||||
struct x509_certificate *chain,
|
||||
int *reason)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
static inline struct x509_certificate *
|
||||
x509_certificate_get_subject(struct x509_certificate *chain,
|
||||
struct x509_name *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int x509_certificate_self_signed(struct x509_certificate *cert)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INTERNAL_X509 */
|
||||
|
||||
#endif /* X509V3_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue