Giter VIP home page Giter VIP logo

pcsc's People

Contributors

hanez avatar nattynarwhal avatar remicollet avatar weltling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pcsc's Issues

SEGFAULT using new functions scard_begin_transaction()

I added two new functions and don't know why I get a segfault when invoking scard_begin_transaction()...

I am not that deep into PECL extension debugging so I can not figure out what is going wrong.

When running ./docs/examples/simple.php I get a segmentation fault when executing the script on line 647 in pcsc.c:

ZEND_FETCH_RESOURCE(hCard, SCARDHANDLE, &conn_res, -1, PHP_PCSC_CONN_RES_NAME, le_pcsc_conn_res);

GDB gives me this:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4b1c611 in zif_scard_begin_transaction (execute_data=0x7ffff52136d0, return_value=0x7ffff5213370)
at /home/hanez/code/pcsc-for-php/pcsc/pcsc.c:647
647 ZEND_FETCH_RESOURCE(hCard, SCARDHANDLE, &conn_res, -1, PHP_PCSC_CONN_RES_NAME, le_pcsc_conn_res);

I believe I did everything right but it seems I didn't... :(

Can someone explain what is wrong or give me some hints how to debug this?

Error compiling for PHP 8 with VS16

Git head gives these errors at the moment:

pcsc_arginfo.h(73): error C2065: 'arginfo_scard_begin_transaction': undeclared identifier
pcsc_arginfo.h(74): error C2065: 'arginfo_scard_end_transaction': undeclared identifier
pcsc_arginfo.h(73): error C2099: initializer is not a constant
pcsc_arginfo.h(73): warning C4047: 'initializing': 'const _zend_internal_arg_info *' differs in levels of indirection from 'uint32_t'
pcsc_arginfo.h(74): error C2099: initializer is not a constant
pcsc_arginfo.h(74): warning C4047: 'initializing': 'const _zend_internal_arg_info *' differs in levels of indirection from 'uint32_t'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29333\bin\HostX64\x64\cl.exe"' : return code '0x2'
Stop.

I had to regenerate the arginfo header files.

help to get uid smartcard

hello
i want to get uid smart card
But I do not know how to set $apdu ?
What is the required amount to receive uid?
example: $apdu = "";
Please help me set the appropriate value for the $ apdu variable instead
thanks.

cardreader : duali dragon

Fatal error: scard_connect(): Return value must be of type array|false, resource returned in Unknown on line 0

I switched to PHP 8.0.3 today for testing but it seems that the extension is not working there. In 7.4.16 everything works as expected. Does someone have an idea what could be wrong here?

hanez@jupiter [master] examples # php -dextension=pcsc simple.php

Warning: Module "PC/SC" is already loaded in Unknown on line 0
>> Create Context
resource(4) of type (PC/SC Context)
int(0)
string(15) "SCARD_S_SUCCESS"

>> Get Readers
array(2) {
  [0]=>
  string(38) "OMNIKEY CardMan (076B:5321) 5321 00 00"
  [1]=>
  string(38) "OMNIKEY CardMan (076B:5321) 5321 00 01"
}
int(0)
string(15) "SCARD_S_SUCCESS"

>> Select Reader
Using reader: OMNIKEY CardMan (076B:5321) 5321 00 01
int(0)
string(15) "SCARD_S_SUCCESS"

>> Connect to Card

Fatal error: scard_connect(): Return value must be of type array|false, resource returned in Unknown on line 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.