xmlseclibs

How do I convert an XML RSA key to a PEM file?

两盒软妹~` 提交于 2019-12-29 04:21:07
问题 I have two XML files, structured as follows: My Key <RSAKeyValue> <Modulus> ... </Modulus> <Exponent> ... </Exponent> <P> ... </P> <Q> ... </Q> <DP> ... </DP> <DQ> ... </DQ> <InverseQ> ... </InverseQ> <D> ... </D> </RSAKeyValue> A Public Key <RSAKeyValue> <Modulus> ... </Modulus> <Exponent> ... </Exponent> </RSAKeyValue> I am using the xmlseclibs library by Robert Richards which requires a .PEM representation of the key in order to encrypt and decrypt things. As an encryption novice, I'm not

Verifying windows 8 purchases (receipts) using PHP

北战南征 提交于 2019-12-18 17:00:54
问题 I need to verify in-app purchases made in Windows 8 applications server-side using PHP. MSDN's documentation page has an example only in C#. Right now I've spent a whole day by searching for a way to do it in PHP. No success. All over the internet there are only .NET examples on this topic. I've found some partial information about signed XML and x509, some libraries (xmlseclibs - useless, uses openssl_* functions which do not support sha256; phpseclib - looks promising but their

Which is the proper XML exclusive canonicalization?

天大地大妈咪最大 提交于 2019-12-02 08:00:45
问题 I'm using xmlseclibs to try and sign a SOAP document, but it does not seem to canonicalize things in the same way depending on whether I'm signing or validating. I'll give you an example. This is the XML I am trying to sign: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" MajorVersion="1" MinorVersion="1"

Which is the proper XML exclusive canonicalization?

这一生的挚爱 提交于 2019-12-02 07:18:57
I'm using xmlseclibs to try and sign a SOAP document, but it does not seem to canonicalize things in the same way depending on whether I'm signing or validating. I'll give you an example. This is the XML I am trying to sign: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" MajorVersion="1" MinorVersion="1" IssueInstant="2010-02-04T15:27:43Z" ResponseID="pfxe85313e6-e688-299a-df06-30f55e24f65a"> <samlp:Status> <samlp

How do I convert an XML RSA key to a PEM file?

岁酱吖の 提交于 2019-11-28 21:41:01
I have two XML files, structured as follows: My Key <RSAKeyValue> <Modulus> ... </Modulus> <Exponent> ... </Exponent> <P> ... </P> <Q> ... </Q> <DP> ... </DP> <DQ> ... </DQ> <InverseQ> ... </InverseQ> <D> ... </D> </RSAKeyValue> A Public Key <RSAKeyValue> <Modulus> ... </Modulus> <Exponent> ... </Exponent> </RSAKeyValue> I am using the xmlseclibs library by Robert Richards which requires a .PEM representation of the key in order to encrypt and decrypt things. As an encryption novice, I'm not sure where to begin, and a cursory Google search did not reveal anything particularly obvious... Thanks