Hi,

thanks for the quick reply/correction.

On Thursday, 7. June 2012, Martin Paljak wrote:
> On Thu, Jun 7, 2012 at 10:35 PM, Martin Paljak <mar...@martinpaljak.net> 
wrote:
> > Hello,
> > 
> > On Thu, Jun 7, 2012 at 10:24 PM, Peter Marschall <pe...@adpm.de> wrote:
> >> Here they are:
> >> * What's the exact difference between WRITE BINARY & UPDATE BINARY?
> >>  My understanding of the spec is that WRITE BINARY can extend a file's
> >> size, while UPDATE BINARY can only update data elements that are
> >> already within the file (i.e. in the range [0 .. file_size-1]).
> >>  Is my understanding correct or did I misunderstand the specscompletely?
> > 
> > AFAIU either can change file size (which can be done though 7816-9).
> 
> Correction, can NOT change file size.

Does that mean that none of them can change the number of data elements that
are in the file ?

This seems to contradict the sentence in ISO 7816-4 7.2.4 WRITE BINARY which 
states:
"- the write-once of the bits given in the command data field (the command 
shall be aborted if thestring of data units is not in the logical erased 
state)"

To me that sentence sounds like WRITE BINARY is an operation that 
A) can only be used on data that is logically reset, 
    (i.e. once WRITE_BINARY was performed, it cannot be used on the same data
    any more without a preceding ERASE BINARY of that region)
B) can extend the number of data units in the file
    (this is what I sloppily called existing_file_size in my< previous mail)

In the other hand, ISO 7816-4 7.2.4 UPDATE BINARY says:
"the command initialtes the update of the bits already present in an EF ..."

This is what I interpret as "can only update existing data units in the file, 
but not create more.

Am I completely wrong?
Are there "interpretation helpers" for the spec available somewhere?


While I am at it: 
Would you mind to pull Pull Request #53
        https://github.com/OpenSC/OpenSC/pull/53
into the staging branch of github's open/opensc?
(It is a little bit frustrating to not get any feedback at all for a PullReq 
;-)

Thanks
PEter

-- 
Peter Marschall
pe...@adpm.de
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to