* Adds the following openssl compatibility API's:

- SSL_CIPHER_get_id
  - SSL_CIPHER_get_rfc_name
  - SSL_get_cipher_by_value
  - X509_print_ex
  - X509_NAME_add_entry_by_NID
  - X509_time_adj
  - X509_time_adj_ex
  - DTLSv1_get_timeout
  - DTLSv1_handle_timeout
  - DTLSv1_set_initial_timeout_duration
  - SSL_CTX_set_current_time_cb
  - PEM_write_bio_RSA_PUBKEY
  - PEM_read_bio_RSA_PUBKEY
  - PEM_write_bio_PUBKEY
  - EVP_PKEY_missing_parameters
  - EVP_PKEY_cmp
  - BN_is_negative
  - BIO_set_retry_write
* Improvements to the notBefore and notAfter date handling.
* Improvements to BIO and BIO_METHOD
  - Moved structure to public area to allow for dereferencing
  - Renamed members to provide compatibility.
  - Added support for custom BIO methods for read/write.
* Added advanced openssl compatibility test cases for key and certificate generation.
* Fix for `ASN1_STRING_set` to allow NULL data.
* Fix to populate public key information on `EVP_PKEY_assign_RSA` and `EVP_PKEY_assign_EC_KEY`.
* Fix naming for `X509_get_notBefore` and `X509_get_notAfter` functions.
* Added `wc_EccPublicKeyDerSize`.
* Improvements to `wc_RsaPublicKeyDerSize`, so dummy memory doesn't have to be allocated.
* Made the `wc_*PublicKeyDerSize` functions public.
* Eliminate use of snprintf for UTC to generalized time conversion in `wolfSSL_ASN1_TIME_to_generalizedtime`.
This commit is contained in:
David Garske
2019-09-24 10:45:33 -07:00
parent 4a6925e2ef
commit 872d222b59
23 changed files with 1464 additions and 672 deletions

View File

@@ -5819,7 +5819,7 @@ WOLFSSL_API const unsigned char* wolfSSL_X509_get_der(WOLFSSL_X509*, int*);
\brief This function checks to see if x509 is NULL and if its not,
it returns the notAfter member of the x509 struct.
\return pointer returns a constant byte pointer to the notAfter
\return pointer to struct with ASN1_TIME to the notAfter
member of the x509 struct.
\return NULL returned if the x509 object is NULL.
@@ -5830,15 +5830,15 @@ WOLFSSL_API const unsigned char* wolfSSL_X509_get_der(WOLFSSL_X509*, int*);
WOLFSSL_X509* x509 = (WOLFSSL_X509)XMALOC(sizeof(WOLFSSL_X509), NULL,
DYNAMIC_TYPE_X509) ;
...
byte* notAfter = wolfSSL_X509_notAfter(x509);
const WOLFSSL_ASN1_TIME* notAfter = wolfSSL_X509_get_notAfter(x509);
if(notAfter == NULL){
// Failure case, the x509 object is null.
// Failure case, the x509 object is null.
}
\endcode
\sa none
\sa wolfSSL_X509_get_notBefore
*/
WOLFSSL_API const unsigned char* wolfSSL_X509_notAfter(WOLFSSL_X509*);
WOLFSSL_API WOLFSSL_ASN1_TIME* wolfSSL_X509_get_notAfter(WOLFSSL_X509*);
/*!
\ingroup CertsKeys
@@ -12210,8 +12210,8 @@ WOLFSSL_API char* wolfSSL_X509_get_next_altname(WOLFSSL_X509*);
\brief The function checks to see if x509 is NULL and if its not, it
returns the notBefore member of the x509 struct.
\return pointer This function returns a constant byte pointer to the x509s
member notAfter.
\return pointer to struct with ASN1_TIME to the notBefore
member of the x509 struct.
\return NULL the function returns NULL if the x509 structure is NULL.
\param x509 a pointer to the WOLFSSL_X509 struct.
@@ -12221,15 +12221,15 @@ WOLFSSL_API char* wolfSSL_X509_get_next_altname(WOLFSSL_X509*);
WOLFSSL_X509* x509 = (WOLFSSL_X509)XMALLOC(sizeof(WOLFSSL_X509), NULL,
DYNAMIC_TYPE_X509) ;
byte* notAfter = wolfSSL_X509_notAfter(x509);
const WOLFSSL_ASN1_TIME* notAfter = wolfSSL_X509_get_notBefore(x509);
if(notAfter == NULL){
//The x509 object was NULL
}
\endcode
\sa wolfSSL_X509_notAfter
\sa wolfSSL_X509_get_notAfter
*/
WOLFSSL_API const unsigned char* wolfSSL_X509_notBefore(WOLFSSL_X509*);
WOLFSSL_API WOLFSSL_ASN1_TIME* wolfSSL_X509_get_notBefore(WOLFSSL_X509*);
/*!
\ingroup IO