Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15929

Replace RAND_pseudo_bytes in util.cc

    XMLWordPrintableJSON

Details

    • Reviewed

    Description

      RAND_pseudo_bytes was deprecated in OpenSSL 1.1.1. We get the following warning during compilation that it's deprecated -

      /mnt/c/Users/Gautham/projects/apache/wsl/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc: In function ‘std::string hdfs::GetRandomClientName()’:
      /mnt/c/Users/Gautham/projects/apache/wsl/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc:78:31: warning: ‘int RAND_pseudo_bytes(unsigned char*, int)’ is deprecated [-Wdeprecated-declarations]
         78 |   RAND_pseudo_bytes(&buf[0], 8);
            |                               ^
      In file included from /usr/include/openssl/e_os2.h:13,
                       from /usr/include/openssl/ossl_typ.h:19,
                       from /usr/include/openssl/rand.h:14,
                       from /mnt/c/Users/Gautham/projects/apache/wsl/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.h:29,
                       from /mnt/c/Users/Gautham/projects/apache/wsl/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc:19:
      /usr/include/openssl/rand.h:44:1: note: declared here
         44 | DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num))
            | ^~~~~~~~~~~~~~~~~~
      /mnt/c/Users/Gautham/projects/apache/wsl/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/util.cc:78:31: warning: ‘int RAND_pseudo_bytes(unsigned char*, int)’ is deprecated [-Wdeprecated-declarations]
         78 |   RAND_pseudo_bytes(&buf[0], 8);
            |                               ^
      

      Attachments

        Issue Links

          Activity

            People

              gaurava Gautham Banasandra
              gaurava Gautham Banasandra
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m