def _encode_asn1_str(backend, data, length):
 s = backend._lib.ASN1_OCTET_STRING_new()
 res = backend._lib.ASN1_OCTET_STRING_set(s, data, length)
 backend.openssl_assert((res == 1))
 return s

def _encode_asn1_str ( backend , data , length ) : s = backend . _lib . ASN1_OCTET_STRING_new ( ) res = backend . _lib . ASN1_OCTET_STRING_set ( s , data , length ) backend . openssl_assert ( ( res == 1 ) ) return s
create an asn1_octet_string from a python byte string .