Project

General

Profile

Bug #10032

PHP binding generates incorrect get/set methods for signatureMethod

Added by Brett Gardner about 7 years ago. Updated about 7 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
18 February 2016
Due date:
% Done:

100%

Estimated time:
Patch proposed:
No
Planning:

Description

There appears to be a bug in the bindings/php5/php_code.py whereby it
generates the following functions


protected function get_signatureMethod() {
$t = LassoServer_signatureMethod_get($this->_cptr);
$t = cptrToPhp($t);
return $t;
}
protected function set_signatureMethod($value) {
$value = $value->_cptr;
LassoServer_signatureMethod_set($this->_cptr, $value);
}

but it should be


protected function get_signatureMethod() {
$t = LassoServer_signatureMethod_get($this->_cptr);
return $t;
}
protected function set_signatureMethod($value) {
LassoServer_signatureMethod_set($this->_cptr, $value);
}

Currently calling

$server->signatureMethod = LASSO_SIGNATURE_METHOD_RSA_SHA256;

or

print $server->signatureMethod

both cause errors.

This can be worked around with the following


LassoServer_signatureMethod_set($server->_cptr,LASSO_SIGNATURE_METHOD_RSA_SHA256);
print LassoServer_signatureMethod_get($server->_cptr);

However, this relies upon $server->_cptr being public

Associated revisions

Revision 02237580 (diff)
Added by Benjamin Dauvergne about 7 years ago

bindings/php5: fix enum getters and setters (fixes #10032)

enumeration type were being wrongly interpreted as objects types because
is_object() was used instead of the local specialisation done in
PhpCode.is_object().

Also fix docstring of getters/setters.

History

#1

Updated by Benjamin Dauvergne about 7 years ago

  • Status changed from Nouveau to Résolu (à déployer)
  • % Done changed from 0 to 100
#2

Updated by Benjamin Dauvergne about 7 years ago

  • Target version set to 2.5.1
#3

Updated by Benjamin Dauvergne about 7 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF