Karaf: Camel route: unable to find valid certification path to requested target - apache-camel
I tried to config Camel route in order to forward my SOAP request to SSL endpoint. Here is my camel configuration for SSL connection:
<http:conduit name="https://localhost:*">
<http:tlsClientParameters secureSocketProtocol="SSL">
<sec:keyManagers keyPassword="changeit">
<sec:keyStore type="JKS" password="changeit"
file="C:\Program Files (x86)\Java\jdk1.7.0_79\jre\lib\security\cacerts"/>
</sec:keyManagers>
<sec:trustManagers>
<sec:keyStore type="JKS" password="changeit"
file="C:\Program Files (x86)\Java\jdk1.7.0_79\jre\lib\security\cacerts"/>
</sec:trustManagers>
</http:tlsClientParameters>
<http:authorization>
<sec:UserName>username</sec:UserName>
<sec:Password>password</sec:Password>
</http:authorization>
The error I got from the Karaf log is shown as below:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)[:1.7.0_79]
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1904)[:1.7.0_79]
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:279)[:1.7.0_79]
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:273)[:1.7.0_79]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1446)[:1.7.0_79]
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:209)[:1.7.0_79]
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:901)[:1.7.0_79]
at sun.security.ssl.Handshaker.process_record(Handshaker.java:837)[:1.7.0_79]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1023)[:1.7.0_79]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)[:1.7.0_79]
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:709)[:1.7.0_79]
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)[:1.7.0_79]
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)[:1.7.0_79]
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:126)[:1.7.0_79]
at java.io.FilterOutputStream.write(FilterOutputStream.java:97)[:1.7.0_79]
at org.apache.commons.httpclient.methods.StringRequestEntity.writeRequest(StringRequestEntity.java:145)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)[211:org.apache.servicemix.bundles.commons-httpclient:3.1.0.7]
at org.apache.camel.component.http.HttpProducer.executeMethod(HttpProducer.java:244)[212:org.apache.camel.camel-http:2.14.1]
at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:144)[212:org.apache.camel.camel-http:2.14.1]
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)[116:org.apache.camel.camel-core:2.14.1]
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)[118:org.apache.camel.camel-jms:2.14.1]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[111:org.apache.servicemix.bundles.spring-jms:3.2.11.RELEASE_1]
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[111:org.apache.servicemix.bundles.spring-jms:3.2.11.RELEASE_1]
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[111:org.apache.servicemix.bundles.spring-jms:3.2.11.RELEASE_1]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[111:org.apache.servicemix.bundles.spring-jms:3.2.11.RELEASE_1]
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[111:org.apache.servicemix.bundles.spring-jms:3.2.11.RELEASE_1]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101)[111:org.apache.servicemix.bundles.spring-jms:3.2.11.RELEASE_1]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093)[111:org.apache.servicemix.bundles.
spring-jms:3.2.11.RELEASE_1]
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990)[111:org.apache.servicemix.bundles.spring-jms:3.2.1
1.RELEASE_1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385)[:1.7.0_79]
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)[:1.7.0_79]
at sun.security.validator.Validator.validate(Validator.java:260)[:1.7.0_79]
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326)[:1.7.0_79]
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231)[:1.7.0_79]
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126)[:1.7.0_79]
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428)[:1.7.0_79]
... 42 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)[:1.7.0_79]
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)[:1.7.0_79]
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)[:1.7.0_79]
... 48 more
I also import the certificate file into my JVM using the command:
keytool -import -alias itpam -keystore "C:\Program Files (x86)\Java\jdk1.7.0_79\jre\lib\security\cacerts" -file c:\mycert.cer
Certification information can be seen as below:
Owner: O=ComputerAssociates, OU=EmbeddedIAM, OU=ApplicationInstance, CN=CERT-Process Automation
Issuer: O=iTechnology, OU=Configuration, OU=CertServer, CN=CSCVIEAE635989
Serial number: 1230abc
Valid from: Mon Dec 22 15:23:19 ICT 2014 until: Thu Dec 19 15:23:19 ICT 2024
Certificate fingerprints:
MD5: 7A:37:45:BF:28:E0:36:58:4D:7C:D0:26:2A:FD:2F:CC
SHA1: 76:E1:CB:86:8D:9A:D1:5A:95:CC:E9:5C:3B:A4:C9:FF:E6:B9:D3:8C
SHA256: E5:60:76:7F:90:D5:FA:4A:FC:93:C1:4F:FF:30:38:69:79:91:69:EC:CF:
46:B0:01:32:B6:0D:00:B7:30:9D:DB
Signature algorithm name: SHA1withRSA
Version: 3
Extensions:
#1: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: FA 36 2F 87 D6 4B 89 A4 F5 9D 8A B2 78 97 86 9F .6/..K......x...
0010: F4 A1 9F 59 ...Y
]
[O=iTechnology, OU=Configuration, OU=CertServer, CN=CSCVIEAE635989]
SerialNumber: [ 01230abc]
]
#2: ObjectId: 2.5.29.17 Criticality=false
SubjectAlternativeName [
RFC822Name: email#ca.com
]
#3: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: FE FF 9A 44 43 55 DA CA 14 7E 20 5F E3 E8 A4 91 ...DCU.... _....
0010: B6 10 56 28 ..V(
]
]
Am I missing anything?
Related
How do I read song meta information from an m4a file?
I have code that reads ID3 tags from an mp3 file, but now I have some m4a files. I found some info on the structure of these files, but that doesn't mention ID3 tags. What's the best resource for m4a file structure? Is the song metadata in the m4a structure, or in the contained audio file (which appears to be AAC)?
M4A is just a filename extension - it still remains an MP4 container. Which consists of atoms/boxes (not chunks). The best resource is usually the documentation of the vendor himself, followed by experts with long experience, followed by additional details, followed by simplified explanations: Apple: QuickTime File Format Specification; Metadata ExifTool: QuickTime ItemList Tags Multimedia.cx: QuickTime container; ยง 2.6: Meta data xhelmboyx: MP4 layout = ISO 14496-1 Media Format Just Solve the File Format Problem: MP4, which uses the... ISO Base Media File Format, which grew from... QuickTime, which uses the... Boxes/atoms format Strictly by standard only the (MP4) container should have the overall metadata and any of the streams inside should not be searched for metadata. However, don't rely on this, and don't ignore potentially valuable metadata that can be in any/all of the streams (video, audio, subtitles, pictures...). Containers are like archives: they contain one or more files - and for each file you're back at where you began, because you have to recursively analyze that file again. AAC is by far not the only possible audio stream/codec - you could also run across an MP3 in an MP4 container. ID3 can occur in MP4 as atom ID32, as mentioned here, but this is rare and only allows version 2.x, not version 1. Additionally to the formats own metadata atoms other metadata formats (not specifically aiming at music) can be embedded in the following atoms: system atom UUID with value other atoms XMP 0xBE 7A CF CB 97 A9 42 E8 9C 71 99 94 91 E3 AF AC XMP_ or xml or xmlc Exif 0x05 37 cd ab 9d 0c 44 31 a7 2a fa 56 1f 2a 11 3e or JpgTiffExif->JP2 exif or exfc IPTC 0x33 c7 a4 d2 b8 1d 47 23 a0 ba f1 a3 e0 97 ad 38 or 0x09 a1 4e 97 c0 b4 42 e0 be bf 36 df 6f 0c e3 6f 8BIM 0x2c 4c 01 00 85 04 40 b9 a0 3e 56 21 48 d6 df eb 360fly 0xef e1 58 9a bb 77 49 ef 80 95 27 75 9e b1 dc 6f ID3 v2.x ID32 Mostly the atoms in an MP4 have this layout: - ftyp - free - mdat + moov - mvhd + udta - cprt + trak - tkhd + udta - cprt + edts - elst + mdia - mdhd - hdlr + minf - smhd - hdlr + dinf - dref + stbl - stsd - stts - stsc - stsz - stco + meta - hdlr (mdta) - mhdr + keys - mdta - mdta - mdta... > ilst + (size, index) - data (type, locale, value) - itif - name - udta > ctry > lang + trak
https://docs.fileformat.com/audio/m4a/ has some details https://github.com/ahyattdev/M4ATools has example code The song meta data is in nested m4a chunks.
combine string in python pandas
I got a problem when analyzing dataset about combining string together. The data frame looks like the one below: IP Event 01 check 01 redo 01 view 02 check 02 check 03 review 04 delete As you can see, the IP contains duplicates. My question is, how can I get the results of combining the Event group by each IP in order.For example, the result I'm looking for is: IP result 01 check->redo->view 02 check->check 03 review 04 delete
try this: In [27]: df.groupby('IP').agg('->'.join).reset_index() Out[27]: IP Event 0 01 check->redo->view 1 02 check->check 2 03 review 3 04 delete or In [26]: df.groupby('IP').agg('->'.join) Out[26]: Event IP 01 check->redo->view 02 check->check 03 review 04 delete
Try this with lambda: df.groupby("IP")['Event'].apply(lambda x: '->'.join(x)).reset_index() # IP Event # 0 1 check->redo->view # 1 2 check->check # 2 3 review # 3 4 delete
Bash parse dynamic arrays and store specific values in an other
I am sending a dbus-send command which returns something like : method return sender=:1.833 -> dest=:1.840 reply_serial=2 array of bytes [ 00 01 02 03 04 05 ] int 1 boolean true The "array of bytes" size is dynamic an can contains n values. I store the result of the dbus-send command in an array by using : array=($(dbus-send --session --print-repl ..readValue)) I want to be able to retrieve the values contained into the array of bytes and be able to display one or all of them if necessary like this : data read => 00 01 02 03 04 05 or first data read => 00 First data is always reachable by {array[10]} and I think is it possible to use a structure like : IFS=" " read -a array for element in "${array[#]:10}" do ... done Any thoughts on how to accomplish this?
You really should use some library for dbus, like Net::DBus or something similar. Anyway, for the above example you could write: #fake dbus-send command dbus-send() { cat <<EOF method return sender=:1.833 -> dest=:1.840 reply_serial=2 array of bytes [ 00 01 02 03 04 05 ] int 1 boolean true EOF } array=($(dbus-send --session --print-repl ..readValue)) data=($(echo "${array[#]}" | grep -oP 'array\s*of\s*bytes\s*\[\s*\K[^]]*(?=\])')) echo "ALL data ==${data[#]}==" echo "First item: ${data[0]}" echo "All items as lines" printf "%s\n" "${data[#]}" data=($(echo "${array[#]}" | sed 's/.*array of bytes \[\([^]]*\)\].*/\1/')) echo "ALL data ==${data[#]}==" echo "First item: ${data[0]}" echo "All items as lines" printf "%s\n" "${data[#]}" for the both example prints ALL data ==00 01 02 03 04 05== First item: 00 All items as lines 00 01 02 03 04 05
S3 uploads thru angular
Using this plugin Sooooo ive got a problem So, i am generating a signed S3 url on my server, and attempting to upload using this plugin. I can generate the url and upload a file using How its worked before shell curl -T file.jpg http://bla.s3.amazon.com/blahbahbla How im doing it When I attempt to upload the file from the browser like this ```javascript $upload.http({ url: decodeURIComponent(data.signed_url), method: 'PUT', data: file, headers: { 'Content-Type':file.type, } }).progress(function(evt) { console.log('percent: ' + parseInt(100.0 * evt.loaded / evt.total)); }).success(function(data, status, headers, config) { console.log(data); }).error(function(data, status, headers, config) { console.warn(data, status); }); ``` Response I get a response like this <?xml version="1.0" encoding="UTF-8"?> <Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message><StringToSignBytes>50 55 54 0a 0a 69 6d 61 67 65 2f 6a 70 65 67 0a 31 34 35 32 38 37 39 36 38 36 0a 78 2d 61 6d 7a 2d 61 63 6c 3a 70 75 62 6c 69 63 2d 72 65 61 64 0a 2f 62 67 70 72 6f 6f 66 2f 66 61 63 65 62 6f 6f 6b 3a 31 30 30 30 30 33 34 37 31 35 37 34 31 30 35 2f 33 65 31 62 36 64 32 39 2d 62 66 34 31 2d 34 37 62 31 2d 61 35 31 33 2d 30 38 38 61 39 63 30 32 61 39 62 63 2e 6a 70 67</StringToSignBytes><RequestId>CE628CB59F561A3D</RequestId><HostId>u5iLkvYLE0hRj30IU+qMS+XiwlwY/VXt8ZACxyot2KDwnLw5S2HL/pGgk4F/nHfr</HostId><SignatureProvided>hJg fYN2h6qz9jJATt4Zp A C94=</SignatureProvided><StringToSign>PUT image/jpeg 1452879686 x-amz-acl:public-read /kirkstrobeck/facebook:100003471574105/3e1b6d29-bf41-47b1-a513-088a9c02a9bc.jpg</StringToSign><AWSAccessKeyId>MY_ACCESS_KEY</AWSAccessKeyId></Error> Here are the headers for both requests Req Headers PUT /facebook:100003471574105/3e1b6d29-bf41-47b1-a513-088a9c02a9bc.jpg?AWSAccessKeyId=MY_ACCESS_KEY&Expires=1452879686&Signature=hJg+fYN2h6qz9jJATt4Zp+A+C94=&x-amz-acl=public-read HTTP/1.1 Host: kirkstrobeck.s3.amazonaws.com Connection: keep-alive Content-Length: 362867 Cache-Control: no-cache Pragma: no-cache Accept: application/json, text/plain, */* Origin: http://localhost:5005 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 Content-Type: image/jpeg Referer: http://localhost:5005/ Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Res Headers HTTP/1.1 403 Forbidden Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, PUT, DELETE Access-Control-Max-Age: 10000 Vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method x-amz-request-id: CE628CB59F561A3D x-amz-id-2: u5iLkvYLE0hRj30IU+qMS+XiwlwY/VXt8ZACxyot2KDwnLw5S2HL/pGgk4F/nHfr Content-Type: application/xml Transfer-Encoding: chunked Date: Wed, 15 Jan 2014 05:41:26 GMT Connection: close Server: AmazonS3 This is how we are generating the signed putObject url in NodeJS var uuid = require('node-uuid'); var AWS = require('aws-sdk'); var s3 = new AWS.S3({ apiVersion: '2014-01-10', accessKeyId: 'AWS_ACCESS_KEY', secretAccessKey: 'AWS_SEC_ACCESS_KEY' }); module.exports = function (req, res, next) { var exten = req.param('ext'); var expire = req.param('expire'); var key = uuid.v4() + exten; var params = { Bucket: 'BUCKET_NAME', Key: key, Expires: 900, ACL: 'public-read' }; s3.getSignedUrl('putObject', params, function(err, url){ // .. handle callback }); };
This example can maybe help: https://github.com/bookingbricks/file-upload-example Using: Node, aws-sdk-js, jQuery-file-upluad (blueimp) Server: var AWS = require('aws-sdk'); AWS.config.update({accessKeyId: AWS_ACCESS_KEY, secretAccessKey: AWS_SECRET_KEY}); AWS.config.region = 'eu-west-1'; app.post('/s', function (req, res) { var s3 = new AWS.S3(); var params = {Bucket: 'BUCKETNAME', Key: req.body.name, ContentType: req.body.type}; s3.getSignedUrl('putObject', params, function(err, url) { if(err) console.log(err); res.json({url: url}); }); }); Client: $.ajax({ url: '/s', type: 'POST', data: {name: file.name, size: file.size, type:file.type}, }).success(function(res){ $.ajax({ url: res.url, type: 'PUT', data: file, processData: false, contentType: file.type, }).success(function(res){ console.log('Done'); });
Looking through http://s3.amazonaws.com/doc/s3-developer-guide/RESTAuthentication.html, it looks like your's using the query string method of authentication, so your request must be of the form GET /my-bucket/foo ?Signature=<urlencode(base64(hmac-sha1(VERB + "\n" + CONTENT-MD5 + "\n" + CONTENT-TYPE + "\n" + Expires + "\n" + CanonicalizedAmzHeaders + "\n" + CanonicalizedResource)))> &Expires=<seconds since epoch> &AWSAccessKeyId=<aws-id> Addressing each of these, comparing how you generate the signed request with the request itself VERB: According to http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/frames.html using 'putObject' is the correct way to request signing a PUT request. Your request headers seem to use a PUT request. CONTENT-MD5: You haven't specified a ContentMD5 option when signing your request on the server. According to the docs this is optional, but an empty string + new line must be included in the string for which the signature is calculated. So you might need to add an empty ContentMD5 parameter to the params object passed to getSignedUrl CONTENT-TYPE: ContentType is also optional. However, I note you are sending the ContentType header in the PUT request, but not specifying it when generating the signature. So the S3 may use this to generate the signature to check against, and fail the request. I suggest either setting the ContentType when generating the signature to what it will be in the browser, or make it empty in both cases (probably passing an empty string to the call to getSignedUrl Expires: From the docs: The Expires field is given as the number of seconds since epoch time I'm not sure how the Node API uses the Expires option, but setting it as 900 might mean it has already expired. The url you've written has it output as 1452879686, which is on January 20th 2014. Given your question was written on January 15th/17th, I'm not sure how this matches up. I would check exactly what you need to pass as Expires, and try passing a full date to the call to 'getSignedUrl'. CanonicalizedAmzHeaders: From what I can see, the call to getSignedUrl added x-amz-acl=public-read, so I can only assume it used it when generating the url. CanonicalizedResource: Again I can only assume that the call to getSignedUrl is using this correctly. AWSAccessKeyId: It's in the URL generated, so I assume getSignedUrl used it correctly. In summary: ContentMD5: Set it to the empty string in the params object Make sure ContentType is specified when generating the signature, and make it the same as for the PUT request (or empty or image/jpeg) Set a full date as the Expires option to the params object getSignedUrl, and check the generated URL that this is reasonable.
S3 has very specific requirements for uploading files via POST. There are specific input fields that require values that appear to be missing from your request. Check out the docs for the required fields: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html
Is there a pattern in these bitshifts?
I have some Nikon raw files (.nef) which were rendered useless during a USB transfer. However, the size seems fine and only a handful of bits are shifted - by a value of -0x20 (hex) or -32 (dec). Some of the files could be recovered later with another Computer from the same Card and now I am searching for a solution to recover the other >100 files, which have the same error. Is there a regular pattern? The offsets seem to be in intervals of 0x800 (2048 in dec). Differences between the two files 1. /_LXA9414.dump: 13.703.892 bytes 2. /_LXA9414_broken.dump: 13.703.892 bytes Offsets: hexadec. 84C00: 23 03 13CC00: B1 91 2FA400: 72 52 370400: 25 05 4B9400: AE 8E 641400: 36 16 701400: FC DC 75B400: 27 07 925400: BE 9E A04C00: A8 88 AC2400: 2F 0F 11 difference(s) found. Here are more diffs from other files: http://pastebin.com/9uB3Hx43