mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
WIP
This commit is contained in:
49
src/ssl.c
49
src/ssl.c
@ -22989,7 +22989,40 @@ int wolfSSL_X509_cmp(const WOLFSSL_X509 *a, const WOLFSSL_X509 *b)
|
||||
#endif /* XSNPRINTF */
|
||||
#endif /* !NO_BIO */
|
||||
|
||||
#endif /* OPENSSL_EXTRA */
|
||||
int wolfSSL_X509_signature_print(WOLFSSL_BIO *bp,
|
||||
const WOLFSSL_X509_ALGOR *sigalg, const WOLFSSL_ASN1_STRING *sig)
|
||||
{
|
||||
WOLFSSL_ENTER("wolfSSL_X509_signature_print");
|
||||
|
||||
if (!bp || !sigalg || !sig) {
|
||||
WOLFSSL_MSG("Bad parameter");
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
|
||||
if (wolfSSL_BIO_puts(bp, " Signature Algorithm: ") <= 0) {
|
||||
WOLFSSL_MSG("wolfSSL_BIO_puts error");
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
|
||||
if (wolfSSL_i2a_ASN1_OBJECT(bp, sigalg->algorithm) <= 0) {
|
||||
WOLFSSL_MSG("wolfSSL_i2a_ASN1_OBJECT error");
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
|
||||
#ifndef NO_WOLFSSL_STUB
|
||||
void wolfSSL_X509_get0_signature(const WOLFSSL_ASN1_BIT_STRING **psig,
|
||||
const WOLFSSL_X509_ALGOR **palg, const WOLFSSL_X509 *x509)
|
||||
{
|
||||
(void)psig;
|
||||
(void)palg;
|
||||
(void)x509;
|
||||
WOLFSSL_STUB("wolfSSL_X509_get0_signature");
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* !NO_CERTS */
|
||||
|
||||
#ifdef OPENSSL_EXTRA
|
||||
@ -51159,6 +51192,20 @@ int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
|
||||
int wolfSSL_X509_REQ_add1_attr_by_txt(WOLFSSL_X509 *req,
|
||||
const char *attrname, int type,
|
||||
const unsigned char *bytes, int len)
|
||||
{
|
||||
WOLFSSL_ENTER("wolfSSL_X509_REQ_add1_attr_by_txt");
|
||||
WOLFSSL_STUB("wolfSSL_X509_REQ_add1_attr_by_txt");
|
||||
(void)req;
|
||||
(void)attrname;
|
||||
(void)type;
|
||||
(void)bytes;
|
||||
(void)len;
|
||||
return WOLFSSL_FAILURE;
|
||||
}
|
||||
|
||||
int wolfSSL_X509_REQ_get_attr_by_NID(const WOLFSSL_X509 *req,
|
||||
int nid, int lastpos)
|
||||
{
|
||||
|
@ -301,6 +301,9 @@ char* wolfSSL_EC_POINT_point2hex(const WOLFSSL_EC_GROUP* group,
|
||||
#define EC_GROUP_get_order wolfSSL_EC_GROUP_get_order
|
||||
#define EC_GROUP_order_bits wolfSSL_EC_GROUP_order_bits
|
||||
#define EC_GROUP_method_of wolfSSL_EC_GROUP_method_of
|
||||
#ifndef NO_WOLFSSL_STUB
|
||||
#define EC_GROUP_set_point_conversion_form(...)
|
||||
#endif
|
||||
|
||||
#define EC_METHOD_get_field_type wolfSSL_EC_METHOD_get_field_type
|
||||
|
||||
|
@ -387,6 +387,7 @@ typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
|
||||
#define X509_REQ_sign_ctx wolfSSL_X509_REQ_sign_ctx
|
||||
#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_add1_attr_by_txt wolfSSL_X509_REQ_add1_attr_by_txt
|
||||
#define X509_REQ_get_attr_by_NID wolfSSL_X509_REQ_get_attr_by_NID
|
||||
#define X509_REQ_get_attr wolfSSL_X509_REQ_get_attr
|
||||
#define X509_to_X509_REQ wolfSSL_X509_to_X509_REQ
|
||||
@ -443,6 +444,8 @@ typedef STACK_OF(ACCESS_DESCRIPTION) AUTHORITY_INFO_ACCESS;
|
||||
#define X509_print_ex wolfSSL_X509_print_ex
|
||||
#define X509_print_fp wolfSSL_X509_print_fp
|
||||
#define X509_REQ_print_fp wolfSSL_X509_print_fp
|
||||
#define X509_signature_print wolfSSL_X509_signature_print
|
||||
#define X509_get0_signature wolfSSL_X509_get0_signature
|
||||
#define X509_verify_cert_error_string wolfSSL_X509_verify_cert_error_string
|
||||
#define X509_verify_cert wolfSSL_X509_verify_cert
|
||||
#define X509_verify wolfSSL_X509_verify
|
||||
@ -603,6 +606,7 @@ wolfSSL_X509_STORE_set_verify_cb((WOLFSSL_X509_STORE *)(s), (WOLFSSL_X509_STORE_
|
||||
#define X509_CRL_get_REVOKED wolfSSL_X509_CRL_get_REVOKED
|
||||
|
||||
#define X509_get_X509_PUBKEY wolfSSL_X509_get_X509_PUBKEY
|
||||
#define X509_REQ_get_X509_PUBKEY wolfSSL_X509_get_X509_PUBKEY
|
||||
#define X509_get0_tbs_sigalg wolfSSL_X509_get0_tbs_sigalg
|
||||
#define X509_PUBKEY_get0_param wolfSSL_X509_PUBKEY_get0_param
|
||||
#define X509_PUBKEY_get wolfSSL_X509_PUBKEY_get
|
||||
|
@ -1355,6 +1355,10 @@ WOLFSSL_API int wolfSSL_RSA_print(WOLFSSL_BIO* bio, WOLFSSL_RSA* rsa, int offset
|
||||
WOLFSSL_API int wolfSSL_X509_print_ex(WOLFSSL_BIO* bio, WOLFSSL_X509* x509,
|
||||
unsigned long nmflags, unsigned long cflag);
|
||||
WOLFSSL_API int wolfSSL_X509_print_fp(XFILE fp, WOLFSSL_X509 *x509);
|
||||
WOLFSSL_API int wolfSSL_X509_signature_print(WOLFSSL_BIO *bp,
|
||||
const WOLFSSL_X509_ALGOR *sigalg, const WOLFSSL_ASN1_STRING *sig);
|
||||
WOLFSSL_API void wolfSSL_X509_get0_signature(const WOLFSSL_ASN1_BIT_STRING **psig,
|
||||
const WOLFSSL_X509_ALGOR **palg, const WOLFSSL_X509 *x509);
|
||||
WOLFSSL_API int wolfSSL_X509_print(WOLFSSL_BIO* bio, WOLFSSL_X509* x509);
|
||||
WOLFSSL_ABI WOLFSSL_API char* wolfSSL_X509_NAME_oneline(WOLFSSL_X509_NAME*,
|
||||
char*, int);
|
||||
@ -3594,6 +3598,9 @@ WOLFSSL_API int wolfSSL_X509_REQ_add1_attr_by_NID(WOLFSSL_X509 *req,
|
||||
int len);
|
||||
WOLFSSL_API int wolfSSL_X509_REQ_get_attr_by_NID(const WOLFSSL_X509 *req,
|
||||
int nid, int lastpos);
|
||||
WOLFSSL_API int wolfSSL_X509_REQ_add1_attr_by_txt(WOLFSSL_X509 *req,
|
||||
const char *attrname, int type,
|
||||
const unsigned char *bytes, int len);
|
||||
WOLFSSL_API WOLFSSL_X509_ATTRIBUTE *wolfSSL_X509_REQ_get_attr(
|
||||
const WOLFSSL_X509 *req, int loc);
|
||||
|
||||
|
@ -229,6 +229,7 @@ enum
|
||||
NID_inhibit_any_policy = 168, /* 2.5.29.54 */
|
||||
NID_tlsfeature = 1020, /* id-pe 24 */
|
||||
NID_commonName = 0x03, /* matches ASN_COMMON_NAME in asn.h */
|
||||
NID_buildingName = 1494,
|
||||
|
||||
|
||||
NID_surname = 0x04, /* SN */
|
||||
|
Reference in New Issue
Block a user