wrap wolfSSL_X509_get_der()
parent
6d60fa4b4b
commit
9ff47b5728
|
|
@ -114,6 +114,17 @@ class WolfSSLX509(object):
|
|||
|
||||
return san
|
||||
|
||||
def get_der(self):
|
||||
outSz = _ffi.new("int *")
|
||||
derPtr = _lib.wolfSSL_X509_get_der(self.native_object, outSz)
|
||||
|
||||
if derPtr == _ffi.NULL:
|
||||
return None
|
||||
|
||||
derBytes = _ffi.buffer(derPtr, outSz[0])
|
||||
|
||||
return derBytes
|
||||
|
||||
|
||||
class SSLContext(object):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ ffi.cdef(
|
|||
*/
|
||||
char* wolfSSL_X509_get_subjectCN(void*);
|
||||
char* wolfSSL_X509_get_next_altname(void*);
|
||||
const unsigned char* wolfSSL_X509_get_der(void*, int*);
|
||||
"""
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue