mirror of
https://github.com/panda3d/panda3d.git
synced 2026-04-22 06:28:43 -05:00
Expose OpenSSLWrapper to Python (as requested)
This commit is contained in:
@@ -12,3 +12,39 @@
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: OpenSSLWrapper::load_certificates_from_pem_ram
|
||||
// Access: Public
|
||||
// Description: Reads a chain of trusted certificates from the
|
||||
// indicated data buffer and adds them to the X509_STORE
|
||||
// object. The data buffer should be PEM-formatted.
|
||||
// Returns the number of certificates read on success,
|
||||
// or 0 on failure.
|
||||
//
|
||||
// You should call this only with trusted,
|
||||
// locally-stored certificates; not with certificates
|
||||
// received from an untrusted source.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int OpenSSLWrapper::
|
||||
load_certificates_from_pem_ram(const string &data) {
|
||||
return load_certificates_from_pem_ram(data.data(), data.size());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: OpenSSLWrapper::load_certificates_from_der_ram
|
||||
// Access: Public
|
||||
// Description: Reads a chain of trusted certificates from the
|
||||
// indicated data buffer and adds them to the X509_STORE
|
||||
// object. The data buffer should be DER-formatted.
|
||||
// Returns the number of certificates read on success,
|
||||
// or 0 on failure.
|
||||
//
|
||||
// You should call this only with trusted,
|
||||
// locally-stored certificates; not with certificates
|
||||
// received from an untrusted source.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE int OpenSSLWrapper::
|
||||
load_certificates_from_der_ram(const string &data) {
|
||||
return load_certificates_from_der_ram(data.data(), data.size());
|
||||
}
|
||||
|
||||
@@ -48,12 +48,15 @@ private:
|
||||
OpenSSLWrapper();
|
||||
~OpenSSLWrapper();
|
||||
|
||||
public:
|
||||
PUBLISHED:
|
||||
void clear_certificates();
|
||||
int load_certificates(const Filename &filename);
|
||||
int load_certificates_from_pem_ram(const char *data, size_t data_size);
|
||||
int load_certificates_from_der_ram(const char *data, size_t data_size);
|
||||
|
||||
INLINE int load_certificates_from_pem_ram(const string &data);
|
||||
INLINE int load_certificates_from_der_ram(const string &data);
|
||||
|
||||
X509_STORE *get_x509_store();
|
||||
|
||||
void notify_ssl_errors();
|
||||
|
||||
Reference in New Issue
Block a user