def _set_asn1_time(boundary, when):
 if (not isinstance(when, bytes)):
  raise TypeError('when must be a byte string')
 set_result = _lib.ASN1_GENERALIZEDTIME_set_string(_ffi.cast('ASN1_GENERALIZEDTIME*', boundary), when)
 if (set_result == 0):
  dummy = _ffi.gc(_lib.ASN1_STRING_new(), _lib.ASN1_STRING_free)
  _lib.ASN1_STRING_set(dummy, when, len(when))
  check_result = _lib.ASN1_GENERALIZEDTIME_check(_ffi.cast('ASN1_GENERALIZEDTIME*', dummy))
  if (not check_result):
   raise ValueError('Invalid string')
  else:
   _untested_error()

def _set_asn1_time ( boundary , when ) : if ( not isinstance ( when , bytes ) ) : raise TypeError ( 'when must be a byte string' ) set_result = _lib . ASN1_GENERALIZEDTIME_set_string ( _ffi . cast ( 'ASN1_GENERALIZEDTIME*' , boundary ) , when ) if ( set_result == 0 ) : dummy = _ffi . gc ( _lib . ASN1_STRING_new ( ) , _lib . ASN1_STRING_free ) _lib . ASN1_STRING_set ( dummy , when , len ( when ) ) check_result = _lib . ASN1_GENERALIZEDTIME_check ( _ffi . cast ( 'ASN1_GENERALIZEDTIME*' , dummy ) ) if ( not check_result ) : raise ValueError ( 'Invalid string' ) else : _untested_error ( )
the the time value of an asn1 time object .