FellowTraveler / Open-Transactions-old

Open-Transactions democratizes financial and monetary actions. You can use it for issuing currencies/stock, paying dividends, creating asset accounts, sending/receiving digital cash, writing/depositing cheques, cashier's cheques, creating basket currencies, trading on markets, scripting custom agreements, recurring payments, escrow, etc. Open-Transactions uses strong crypto. The balances are unchangeable (even by a malicious server.) The receipt history is destructible. The transactions are unforgeable. The cash is unlinkable. The cheques are non-repudiable. Etc.
http://opentransactions.org
408 stars 84 forks source link

small swig changes #131

Closed da2ce7 closed 11 years ago

jspit commented 11 years ago

are these related to php as well ? or just for java

i am compiling the whole lot - it would be good if you place the included lib folder as well.

will let you know

On 30 November 2012 06:38, Cameron Garnham notifications@github.com wrote:


You can merge this Pull Request by running:

git pull https://github.com/da2ce7/Open-Transactions c++api

Or view, comment on, or merge it at:

https://github.com/FellowTraveler/Open-Transactions/pull/131 Commit Summary

  • small swig changes

File Changes

  • M swig/buildwrappers.bat (4)
  • M swig/buildwrappers.sh (4)
  • M swig/otapi/OTAPI.i (104)

Patch Links

Jesmond Spiteri

jspit commented 11 years ago

on trying to compile otlib

5> Generating Code... 5>bank-new.obj : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in anyoption.obj 5>bank-new.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification 5>bankimp.obj : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in anyoption.obj 5>LINK : fatal error C1900: Il mismatch between 'P1' version '20100826' and 'P2' version '20081201' 5>LINK : fatal error LNK1257: code generation failed

jspit commented 11 years ago

in php script

include('otapi.php'); $otapi = new OTAPI_Basic(); $otapi_pass = new OTPassword();

$wallet = $otapi->SetWallet("wallet.xml"); if (!$otapi->WalletExists()): die(' wallet not found
'); else: echo(' wallet exists.
'); endif;

$otapi->ConnectServer('tBy5mL14qSQXCJK7Uz3WlTOKRP9M0JZksA3Eg7EnnQ1','T1Q3wZWgeTUoaUvn9m1lzIK5tn5wITlzxzrGNI8qtaV','certs\special\ca.crt','certs\special\client.pem','test');

(these are the default server and nym)

date_default_timezone_set('UTC'); $tm = $otapi->GetTime(); $date = date("d/m/Y H:i:s", $tm); echo( $tm . " = " . $date . "
"); ==== shows ok

if (!$otapi->LoadWallet()): die(' error in loading wallet
'); else: echo(' wallet loaded.
'); endif;

it hangs on loading wallet

in log-client.log, I have

No Nym loaded but tried to connect to server. Passphrase request for: "Enter the master passphrase. (LoadPrivateKeyFromCertString)" OPENSSL_CALLBACK_FUNC(souped_up_pass_cb): Failure: (false == bGotPassword.) (Returning 0.) OTMasterKey::GetMasterPassword: Failure trying to retrieve the passphrase from the user. OPENSSL_CALLBACK_FUNC(souped_up_pass_cb): Failure: (false == bGotPassword.) (Returning 0.) OTAsymmetricKey::LoadPrivateKeyFromCertString: Error reading private key from string:

where are the functions in otapi.php where you can set :

a) server to use b) nym c) password

ie to LOG on to server