예제 #1
0
 def __init__(self, req=None, _pyfree=0):
     # type: (Optional[int], int) -> None
     if req is not None:
         self.req = req
         self._pyfree = _pyfree
     else:
         self.req = m2.x509_req_new()
         m2.x509_req_set_version(self.req, 0)
         self._pyfree = 1
예제 #2
0
파일: X509.py 프로젝트: mcepl/M2Crypto
 def __init__(self, req=None, _pyfree=0):
     # type: (Optional[int], int) -> None
     if req is not None:
         self.req = req
         self._pyfree = _pyfree
     else:
         self.req = m2.x509_req_new()
         m2.x509_req_set_version(self.req, 0)
         self._pyfree = 1
예제 #3
0
    def set_version(self, version):
        # type: (int) -> int
        """
        Set version.

        :param version: Version number.
        :return:        Returns 0 on failure.
        """
        return m2.x509_req_set_version(self.req, version)
예제 #4
0
파일: X509.py 프로젝트: mcepl/M2Crypto
    def set_version(self, version):
        # type: (int) -> int
        """
        Set version.

        :param version: Version number.
        :return:        Returns 0 on failure.
        """
        return m2.x509_req_set_version(self.req, version)
예제 #5
0
    def set_version(self, version):
        """
        Set version.

        @type version:  int
        @param version: Version number.
        @rtype:         int
        @return:        Returns 0 on failure.
        """
        return m2.x509_req_set_version(self.req, version)
예제 #6
0
파일: X509.py 프로젝트: rodrigc/m2crypto
    def set_version(self, version):
        """
        Set version.

        @type version:  int
        @param version: Version number.
        @rtype:         int
        @return:        Returns 0 on failure.
        """
        return m2.x509_req_set_version(self.req, version)