File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed 
libraries/NetworkClientSecure/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -339,9 +339,9 @@ void NetworkClientSecure::setCACert(const char *rootCA) {
339339  _use_insecure = false ;
340340}
341341
342- void  NetworkClientSecure::setCACertBundle (const  uint8_t  *bundle) {
343-   if  (bundle != NULL ) {
344-     esp_crt_bundle_set (bundle, sizeof (bundle) );
342+ void  NetworkClientSecure::setCACertBundle (const  uint8_t  *bundle,  size_t  size ) {
343+   if  (bundle != NULL  && size >  0 ) {
344+     esp_crt_bundle_set (bundle, size );
345345    attach_ssl_certificate_bundle (sslclient.get (), true );
346346    _use_ca_bundle = true ;
347347  } else  {
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ class NetworkClientSecure : public NetworkClient {
7373  void  setCertificate (const  char  *client_ca);
7474  void  setPrivateKey (const  char  *private_key);
7575  bool  loadCACert (Stream &stream, size_t  size);
76-   void  setCACertBundle (const  uint8_t  *bundle);
76+   void  setCACertBundle (const  uint8_t  *bundle,  size_t  size );
7777  bool  loadCertificate (Stream &stream, size_t  size);
7878  bool  loadPrivateKey (Stream &stream, size_t  size);
7979  bool  verify (const  char  *fingerprint, const  char  *domain_name);
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments