src/OpenSSL/crypto.py
def add_extensions(self, extensions):
        """
        Add extensions to the certificate signing request.

        :param extensions: The X.509 extensions to add.
        :type extensions: iterable of :py:class:`X509Extension`
        :return: ``None``
        """
        stack = _lib.sk_X509_EXTENSION_new_null()
        _openssl_assert(stack != _ffi.NULL)

        stack = _ffi.gc(stack, _lib.sk_X509_EXTENSION_free)

        for ext in extensions:
            if not isinstance(ext, X509Extension):
                raise ValueError("One of the elements is not an X509Extension")

            # TODO push can fail (here and elsewhere)
            _lib.sk_X509_EXTENSION_push(stack, ext._extension)

        add_result = _lib.X509_REQ_add_extensions(self._req, stack)
        _openssl_assert(add_result == 1)
def add_extensions(self, extensions):
        stack = _lib.sk_X509_EXTENSION_new_null()
        _openssl_assert(stack != _ffi.NULL)

        stack = _ffi.gc(stack, _lib.sk_X509_EXTENSION_free)

        for ext in extensions:
            if not isinstance(ext, X509Extension):
                raise ValueError("One of the elements is not an X509Extension")

            # TODO push can fail (here and elsewhere)
            _lib.sk_X509_EXTENSION_push(stack, ext._extension)

        add_result = _lib.X509_REQ_add_extensions(self._req, stack)
        _openssl_assert(add_result == 1)
def add_extensions ( self , extensions ) : stack = _lib . sk_X509_EXTENSION_new_null ( ) _openssl_assert ( stack != _ffi . NULL ) stack = _ffi . gc ( stack , _lib . sk_X509_EXTENSION_free ) for ext in extensions : if not isinstance ( ext , X509Extension ) : raise ValueError ( "One of the elements is not an X509Extension" ) # TODO push can fail (here and elsewhere) _lib . sk_X509_EXTENSION_push ( stack , ext . _extension ) add_result = _lib . X509_REQ_add_extensions ( self . _req , stack ) _openssl_assert ( add_result == 1 )
Add extensions to the certificate signing request.

        :param extensions: The X.509 extensions to add.
        :type extensions: iterable of :py:class:`X509Extension`
        :return: ``None``
Add extensions to the certificate signing request .