File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ set -euo pipefail
5
5
uncomment.sh " $1 " --comment -h \
6
6
--uncomment-func-decl ' CRYPTO_BUFFER_new' \
7
7
--uncomment-func-decl ' CRYPTO_BUFFER_free' \
8
- --uncomment-regex ' BORINGSSL_MAKE_DELETER(CRYPTO_BUFFER,'
8
+ --uncomment-regex ' BORINGSSL_MAKE_DELETER(CRYPTO_BUFFER,' \
9
+ --uncomment-regex ' DEFINE_STACK_OF(CRYPTO_BUFFER)'
Original file line number Diff line number Diff line change 1
1
#include <openssl/ssl.h>
2
2
#include <ossl.h>
3
3
4
- STACK_OF (CRYPTO_BUFFER ) * criptoBuffer ;
4
+ // Dummy buffer just to return a non null value in SSL_get0_peer_certificates
5
+ STACK_OF (CRYPTO_BUFFER ) * criptoBuffer = NULL ;
5
6
6
7
const STACK_OF (CRYPTO_BUFFER ) * SSL_get0_peer_certificates (const SSL * ssl ) {
7
8
STACK_OF (X509 ) * x509Temp = SSL_get_peer_cert_chain (ssl );
8
9
if (x509Temp == NULL )
9
10
return NULL ;
10
- else
11
+ else {
12
+ if (criptoBuffer == NULL ) {
13
+ criptoBuffer = sk_CRYPTO_BUFFER_new_null ();
14
+ }
11
15
return criptoBuffer ;
16
+ }
12
17
}
13
-
You can’t perform that action at this time.
0 commit comments