瀏覽代碼

Fix SSL_COMP_get_compression_methods type signature.

We returned the wrong type, but with a typedef which made it void*. In
C++, void* to T* doesn't implicitly convert, so it doesn't quite work
right. Notably, Node passes it into sk_SSL_COMP_zero. The sk_* macros
only weakly typecheck right now, but a pending CL converts them to
proper functions.

Change-Id: I635d1e39e4f4f11b2b7bf350115a7f1b1be30e4f
Reviewed-on: https://boringssl-review.googlesource.com/16447
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 7 年之前
committed by Adam Langley
父節點
當前提交
d55bd797eb
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      include/openssl/ssl.h
  2. +1
    -1
      ssl/ssl_cipher.c

+ 1
- 1
include/openssl/ssl.h 查看文件

@@ -3354,7 +3354,7 @@ OPENSSL_EXPORT const char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher);
typedef void COMP_METHOD;

/* SSL_COMP_get_compression_methods returns NULL. */
OPENSSL_EXPORT COMP_METHOD *SSL_COMP_get_compression_methods(void);
OPENSSL_EXPORT STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);

/* SSL_COMP_add_compression_method returns one. */
OPENSSL_EXPORT int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);


+ 1
- 1
ssl/ssl_cipher.c 查看文件

@@ -1724,7 +1724,7 @@ const char *SSL_CIPHER_get_version(const SSL_CIPHER *cipher) {
return "TLSv1/SSLv3";
}

COMP_METHOD *SSL_COMP_get_compression_methods(void) { return NULL; }
STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void) { return NULL; }

int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm) { return 1; }



Loading…
取消
儲存