mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Implement/stub the following:
- `NID_pkcs9_challengePassword` - added - `wolfSSL_OPENSSL_cleanse` - implemented - `wolfSSL_X509_REQ_add1_attr_by_NID` - stubbed - `wolfSSL_c2i_ASN1_OBJECT` - stubbed
This commit is contained in:
20
configure.ac
20
configure.ac
@ -4258,12 +4258,30 @@ then
|
|||||||
AM_CFLAGS="-DOPENSSL_EXTRA -DOPENSSL_ALL $AM_CFLAGS"
|
AM_CFLAGS="-DOPENSSL_EXTRA -DOPENSSL_ALL $AM_CFLAGS"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Requires OCSP make sure on
|
# Requires OCSP
|
||||||
if test "x$ENABLED_OCSP" = "xno"
|
if test "x$ENABLED_OCSP" = "xno"
|
||||||
then
|
then
|
||||||
ENABLED_OCSP="yes"
|
ENABLED_OCSP="yes"
|
||||||
AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
|
AM_CFLAGS="$AM_CFLAGS -DHAVE_OCSP"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Requires PKCS7
|
||||||
|
if test "x$ENABLED_PKCS7" = "xno"
|
||||||
|
then
|
||||||
|
ENABLED_PKCS7="yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Requires Certificate Generation and Request
|
||||||
|
if test "x$ENABLED_CERTGEN" = "xno"
|
||||||
|
then
|
||||||
|
ENABLED_CERTGEN="yes"
|
||||||
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_GEN"
|
||||||
|
fi
|
||||||
|
if test "x$ENABLED_CERTREQ" = "xno"
|
||||||
|
then
|
||||||
|
ENABLED_CERTREQ="yes"
|
||||||
|
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_CERT_REQ"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MD4
|
# MD4
|
||||||
|
21
src/ssl.c
21
src/ssl.c
@ -45326,6 +45326,12 @@ void *wolfSSL_OPENSSL_memdup(const void *data, size_t siz, const char* file, int
|
|||||||
return XMEMCPY(ret, data, siz);
|
return XMEMCPY(ret, data, siz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wolfSSL_OPENSSL_cleanse(void *ptr, size_t len)
|
||||||
|
{
|
||||||
|
if (ptr)
|
||||||
|
ForceZero(ptr, len);
|
||||||
|
}
|
||||||
|
|
||||||
int wolfSSL_CTX_set_alpn_protos(WOLFSSL_CTX *ctx, const unsigned char *p,
|
int wolfSSL_CTX_set_alpn_protos(WOLFSSL_CTX *ctx, const unsigned char *p,
|
||||||
unsigned int p_len)
|
unsigned int p_len)
|
||||||
{
|
{
|
||||||
@ -49247,6 +49253,21 @@ int wolfSSL_X509_REQ_add_extensions(WOLFSSL_X509* req,
|
|||||||
(void)ext;
|
(void)ext;
|
||||||
return WOLFSSL_FATAL_ERROR;
|
return WOLFSSL_FATAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
||||||
|
int nid, int type,
|
||||||
|
const unsigned char *bytes,
|
||||||
|
int len)
|
||||||
|
{
|
||||||
|
WOLFSSL_ENTER("wolfSSL_X509_REQ_add1_attr_by_NID");
|
||||||
|
WOLFSSL_STUB("wolfSSL_X509_REQ_add1_attr_by_NID");
|
||||||
|
(void)req;
|
||||||
|
(void)nid;
|
||||||
|
(void)type;
|
||||||
|
(void)bytes;
|
||||||
|
(void)len;
|
||||||
|
return WOLFSSL_FAILURE;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int wolfSSL_X509_REQ_set_subject_name(WOLFSSL_X509 *req,
|
int wolfSSL_X509_REQ_set_subject_name(WOLFSSL_X509 *req,
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
#define ASN1_STRING_free wolfSSL_ASN1_STRING_free
|
#define ASN1_STRING_free wolfSSL_ASN1_STRING_free
|
||||||
|
|
||||||
#define ASN1_get_object wolfSSL_ASN1_get_object
|
#define ASN1_get_object wolfSSL_ASN1_get_object
|
||||||
|
#define c2i_ASN1_OBJECT wolfSSL_c2i_ASN1_OBJECT
|
||||||
|
|
||||||
#define V_ASN1_INTEGER 0x02
|
#define V_ASN1_INTEGER 0x02
|
||||||
#define V_ASN1_OCTET_STRING 0x04 /* tag for ASN1_OCTET_STRING */
|
#define V_ASN1_OCTET_STRING 0x04 /* tag for ASN1_OCTET_STRING */
|
||||||
@ -69,6 +70,8 @@
|
|||||||
#define ASN1_TIME_set wolfSSL_ASN1_TIME_set
|
#define ASN1_TIME_set wolfSSL_ASN1_TIME_set
|
||||||
|
|
||||||
#define V_ASN1_OBJECT 6
|
#define V_ASN1_OBJECT 6
|
||||||
|
#define V_ASN1_SEQUENCE 16
|
||||||
|
#define V_ASN1_SET 17
|
||||||
#define V_ASN1_UTCTIME 23
|
#define V_ASN1_UTCTIME 23
|
||||||
#define V_ASN1_GENERALIZEDTIME 24
|
#define V_ASN1_GENERALIZEDTIME 24
|
||||||
#define V_ASN1_PRINTABLESTRING 19
|
#define V_ASN1_PRINTABLESTRING 19
|
||||||
@ -88,6 +91,9 @@ WOLFSSL_API void wolfSSL_ASN1_TYPE_set(WOLFSSL_ASN1_TYPE *a, int type, void *val
|
|||||||
WOLFSSL_API int wolfSSL_ASN1_get_object(const unsigned char **in, long *len, int *tag,
|
WOLFSSL_API int wolfSSL_ASN1_get_object(const unsigned char **in, long *len, int *tag,
|
||||||
int *class, long inLen);
|
int *class, long inLen);
|
||||||
|
|
||||||
|
WOLFSSL_API WOLFSSL_ASN1_OBJECT *wolfSSL_c2i_ASN1_OBJECT(WOLFSSL_ASN1_OBJECT **a,
|
||||||
|
const unsigned char **pp, long len);
|
||||||
|
|
||||||
#ifdef OPENSSL_ALL
|
#ifdef OPENSSL_ALL
|
||||||
/* IMPLEMENT_ASN1_FUNCTIONS is strictly for external use only. Internally
|
/* IMPLEMENT_ASN1_FUNCTIONS is strictly for external use only. Internally
|
||||||
* we don't use this. Some projects use OpenSSL to implement ASN1 types and
|
* we don't use this. Some projects use OpenSSL to implement ASN1 types and
|
||||||
|
@ -53,6 +53,8 @@
|
|||||||
/* all NID_* values are in asn.h */
|
/* all NID_* values are in asn.h */
|
||||||
#include <wolfssl/wolfcrypt/asn.h>
|
#include <wolfssl/wolfcrypt/asn.h>
|
||||||
|
|
||||||
|
#include <wolfssl/openssl/x509.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -377,6 +379,7 @@ typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
|
|||||||
#define X509_REQ_free wolfSSL_X509_REQ_free
|
#define X509_REQ_free wolfSSL_X509_REQ_free
|
||||||
#define X509_REQ_sign wolfSSL_X509_REQ_sign
|
#define X509_REQ_sign wolfSSL_X509_REQ_sign
|
||||||
#define X509_REQ_add_extensions wolfSSL_X509_REQ_add_extensions
|
#define X509_REQ_add_extensions wolfSSL_X509_REQ_add_extensions
|
||||||
|
#define X509_REQ_add1_attr_by_NID wolfSSL_X509_REQ_add1_attr_by_NID
|
||||||
#define X509_REQ_set_subject_name wolfSSL_X509_REQ_set_subject_name
|
#define X509_REQ_set_subject_name wolfSSL_X509_REQ_set_subject_name
|
||||||
#define X509_REQ_set_pubkey wolfSSL_X509_REQ_set_pubkey
|
#define X509_REQ_set_pubkey wolfSSL_X509_REQ_set_pubkey
|
||||||
#define PEM_write_bio_X509_REQ wolfSSL_PEM_write_bio_X509_REQ
|
#define PEM_write_bio_X509_REQ wolfSSL_PEM_write_bio_X509_REQ
|
||||||
@ -1182,6 +1185,7 @@ wolfSSL_X509_STORE_set_verify_cb((WOLFSSL_X509_STORE *)(s), (WOLFSSL_X509_STORE_
|
|||||||
|
|
||||||
#define OPENSSL_config wolfSSL_OPENSSL_config
|
#define OPENSSL_config wolfSSL_OPENSSL_config
|
||||||
#define OPENSSL_memdup wolfSSL_OPENSSL_memdup
|
#define OPENSSL_memdup wolfSSL_OPENSSL_memdup
|
||||||
|
#define OPENSSL_cleanse wolfSSL_OPENSSL_cleanse
|
||||||
#define SSL_CTX_get_timeout wolfSSL_SSL_CTX_get_timeout
|
#define SSL_CTX_get_timeout wolfSSL_SSL_CTX_get_timeout
|
||||||
#define SSL_CTX_set_tmp_ecdh wolfSSL_SSL_CTX_set_tmp_ecdh
|
#define SSL_CTX_set_tmp_ecdh wolfSSL_SSL_CTX_set_tmp_ecdh
|
||||||
#define SSL_CTX_remove_session wolfSSL_SSL_CTX_remove_session
|
#define SSL_CTX_remove_session wolfSSL_SSL_CTX_remove_session
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <wolfssl/openssl/dh.h>
|
#include <wolfssl/openssl/dh.h>
|
||||||
#include <wolfssl/openssl/ec.h>
|
#include <wolfssl/openssl/ec.h>
|
||||||
#include <wolfssl/openssl/ecdsa.h>
|
#include <wolfssl/openssl/ecdsa.h>
|
||||||
|
#include <wolfssl/openssl/pkcs7.h>
|
||||||
|
|
||||||
/* wolfSSL_X509_print_ex flags */
|
/* wolfSSL_X509_print_ex flags */
|
||||||
#define X509_FLAG_COMPAT (0UL)
|
#define X509_FLAG_COMPAT (0UL)
|
||||||
|
@ -3552,6 +3552,10 @@ WOLFSSL_API int wolfSSL_X509_REQ_set_subject_name(WOLFSSL_X509 *req,
|
|||||||
WOLFSSL_X509_NAME *name);
|
WOLFSSL_X509_NAME *name);
|
||||||
WOLFSSL_API int wolfSSL_X509_REQ_set_pubkey(WOLFSSL_X509 *req,
|
WOLFSSL_API int wolfSSL_X509_REQ_set_pubkey(WOLFSSL_X509 *req,
|
||||||
WOLFSSL_EVP_PKEY *pkey);
|
WOLFSSL_EVP_PKEY *pkey);
|
||||||
|
WOLFSSL_API int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
||||||
|
int nid, int type,
|
||||||
|
const unsigned char *bytes,
|
||||||
|
int len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -3775,6 +3779,7 @@ WOLFSSL_API int wolfSSL_set_alpn_protos(WOLFSSL* ssl,
|
|||||||
const unsigned char* protos, unsigned int protos_len);
|
const unsigned char* protos, unsigned int protos_len);
|
||||||
WOLFSSL_API void *wolfSSL_OPENSSL_memdup(const void *data,
|
WOLFSSL_API void *wolfSSL_OPENSSL_memdup(const void *data,
|
||||||
size_t siz, const char* file, int line);
|
size_t siz, const char* file, int line);
|
||||||
|
WOLFSSL_API void wolfSSL_OPENSSL_cleanse(void *ptr, size_t len);
|
||||||
WOLFSSL_API void wolfSSL_ERR_load_BIO_strings(void);
|
WOLFSSL_API void wolfSSL_ERR_load_BIO_strings(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -202,6 +202,7 @@ enum
|
|||||||
NID_sha256 = 672,
|
NID_sha256 = 672,
|
||||||
NID_sha384 = 673,
|
NID_sha384 = 673,
|
||||||
NID_sha512 = 674,
|
NID_sha512 = 674,
|
||||||
|
NID_pkcs9_challengePassword = 54,
|
||||||
NID_hw_name_oid = 73,
|
NID_hw_name_oid = 73,
|
||||||
NID_id_pkix_OCSP_basic = 74,
|
NID_id_pkix_OCSP_basic = 74,
|
||||||
NID_any_policy = 75,
|
NID_any_policy = 75,
|
||||||
|
Reference in New Issue
Block a user