<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def append(self, value):
 """ Adds certificate to stack """

        if not self.need_free:
            raise ValueError("Stack is read-only")
        if not isinstance(value, X509):
            raise TypeError('StackOfX509 can contain only X509 objects')
        sk_push(self.ptr, libcrypto.X509_dup(value.cert))