readium / readium-sdk

A C++ ePub renderer SDK
BSD 3-Clause "New" or "Revised" License
385 stars 164 forks source link

namespace check: encryption.xml EncryptionProperty > ns:Compression, ns = http://www.idpf.org/2016/encryption#compression versus http://readium.org/2015/01/lcp#extendedProperty #230

Closed danielweck closed 8 years ago

danielweck commented 8 years ago

Discrepancy between LCP server and client implementations!

https://github.com/readium/readium-lcp-server/blob/feature/compress-before-encryption/xmlenc/encryption.go#L120

type EncryptionProperty struct {
    Compression Compression `xml:"http://idpf.org/ocf/encryption#compression Compression"`
}

vs.

https://github.com/readium/readium-sdk/blob/develop/ePub3/ePub/encryption.cpp#L27

#define ReadiumURI "http://readium.org/2015/01/lcp#extendedProperty"

See:

https://github.com/readium/readium-lcp-server/issues/24

https://github.com/readium/readium-sdk/pull/219/files#diff-2a91bceb528aa605248d7eea4c1d946fL25

https://github.com/IDPF/epub-revision/issues/646#issuecomment-198400976

thkim2015 commented 8 years ago

First of all, DRM inside doesn't mind to modify the namespace in the client.

In fact, I prefer to using generic IDPF namespace rather than Readium and LCP related one as long as IDPF agrees to update the OCF specification. Because IMO, it is a matter of all DRM solution, not just Readium LCP.

But if IDPF does not want to name new namespace after IDPF, I think we have no choice but to use Readium namespace.

danielweck commented 8 years ago

Regarding the Compression XML element namespace, @mattgarrish says that it's either http://www.idpf.org/2016/encryption#compression (to follow existing conventions) or http://www.idpf.org/ns/encryption#compression (new non-dated URI convention) See https://github.com/IDPF/epub-revision/issues/646#issuecomment-209835576

danielweck commented 8 years ago

EPUB 3.1 draft update: http://rawgit.com/IDPF/epub-revision/master/build/31/spec/epub-ocf.html#sec-enc-compression (Compression element namespace is http://www.idpf.org/2016/encryption#compression )

danielweck commented 8 years ago

Fixed in ReadiumSDK: https://github.com/readium/readium-sdk/issues/162#issuecomment-225597437 https://github.com/readium/readium-sdk/commit/a466b901bafd73ec9483d66e6088983f36161534

LCP server pending change: https://github.com/readium/readium-lcp-server/issues/24#issuecomment-225594254