Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1031

Run configure check to use ASN1_STRING_get0_data over ASN1_STRING_data in bundled libmongoc

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.0-beta1, 1.4.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      While compiling the libmongoc (as part of the PHP driver), I noticed the following warning:

      /home/derick/dev/php/derickr-mongo-php-driver/src/libmongoc/src/mongoc/mongoc-openssl.c: In function ‘_mongoc_openssl_check_cert’:
      /home/derick/dev/php/derickr-mongo-php-driver/src/libmongoc/src/mongoc/mongoc-openssl.c:314:16: warning: ‘ASN1_STRING_data’ is deprecated [-Wdeprecated-declarations]
                      check = (const char *) ASN1_STRING_get0_data (name->d.ia5);
                      ^~~~~
      In file included from /usr/include/openssl/bn.h:31:0,
                       from /usr/include/openssl/asn1.h:24,
                       from /usr/include/openssl/objects.h:916,
                       from /usr/include/openssl/evp.h:27,
                       from /usr/include/openssl/x509.h:23,
                       from /usr/include/openssl/ssl.h:50,
                       from /home/derick/dev/php/derickr-mongo-php-driver/src/libmongoc/src/mongoc/mongoc-openssl.c:24:
      /usr/include/openssl/asn1.h:553:1: note: declared here
       DEPRECATEDIN_1_1_0(unsigned char *ASN1_STRING_data(ASN1_STRING *x))
       ^
      

      ASN1_STRING_data has been deprecated in OpenSSL 1.1, and instead ASN1_STRING_get0_data should be used as per https://www.openssl.org/docs/man1.1.0/crypto/ASN1_STRING_data.html

            Assignee:
            derick Derick Rethans
            Reporter:
            derick Derick Rethans
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: