<style>
/* Changing the layout to use less space for mobiles */
@media screen and (max-device-width: 480px), screen and (-webkit-min-device-pixel-ratio: 2) {
#email-body { min-width: 30em !important; }
#email-page { padding: 8px !important; }
#email-banner { padding: 8px 8px 0 8px !important; }
#email-avatar { margin: 1px 8px 8px 0 !important; padding: 0 !important; }
#email-fields { padding: 0 8px 8px 8px !important; }
#email-gutter { width: 0 !important; }
}
</style>
<div id="email-body">
<table id="email-wrap" align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#f0f0f0;color:#000000;width:100%;">
<tr valign="top">
<td id="email-page" style="padding:16px !important;">
<table align="center" border="0" cellpadding="0" cellspacing="0" style="background-color:#ffffff;border:1px solid #bbbbbb;color:#000000;width:100%;">
<tr valign="top">
<td bgcolor="#3b4d64" style="background-color:#3b4d64;color:#ffffff;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;line-height:1;"><img src="https://issues.jboss.org/s/en_USg4ey11-418945332/852/58/_/jira-logo-scaled.png" alt="" style="vertical-align:top;" /></td>
</tr><tr valign="top">
<td id="email-banner" style="padding:32px 32px 0 32px;">
<table align="left" border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
<tr valign="top">
<td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;padding:0;">
<img id="email-avatar" src="https://community.jboss.org/people/beve/avatar/16.png" alt="" height="48" width="48" border="0" align="left" style="padding:0;margin: 0 16px 16px 0;" />
<div id="email-action" style="padding: 0 0 8px 0;font-size:12px;line-height:18px;">
<a class="user-hover" rel="beve" id="email_beve" href="https://issues.jboss.org/secure/ViewProfile.jspa?name=beve" style="color:#326ca6;">Daniel Bevenius</a>
created <img src="https://issues.jboss.org/images/icons/issuetypes/bug.png" height="16" width="16" border="0" align="absmiddle" alt="Bug"> <a style='color:#326ca6;text-decoration:none;' href='https://issues.jboss.org/browse/AGPUSH-329'>AGPUSH-329</a>
</div>
<div id="email-summary" style="font-size:16px;line-height:20px;padding:2px 0 16px 0;">
<a style='color:#326ca6;text-decoration:none;' href='https://issues.jboss.org/browse/AGPUSH-329'><strong>SimplePush endpoint decryption fails on OpenShift</strong></a>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td id="email-fields" style="padding:0 32px 32px 32px;">
<table border="0" cellpadding="0" cellspacing="0" style="padding:0;text-align:left;width:100%;" width="100%">
<tr valign="top">
<td id="email-gutter" style="width:64px;white-space:nowrap;"></td>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Issue Type:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<img src="https://issues.jboss.org/images/icons/issuetypes/bug.png" height="16" width="16" border="0" align="absmiddle" alt="Bug"> Bug
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Affects Versions:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
0.8.0 </td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Assignee:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<a class="user-hover" rel="beve" id="email_beve" href="https://issues.jboss.org/secure/ViewProfile.jspa?name=beve" style="color:#326ca6;">Daniel Bevenius</a>
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Components:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
OpenShift, SimplePush-server </td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Created:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
02/Sep/13 6:42 AM
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Description:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<p style='margin-top:0;margin-bottom:10px;'>Kris found reported this issue and we were not sure where the problem was. I've been able to reproduce this by only using the SimplePush Server on OpenShift by directly sending a notification to a channel. <br/>
The error I'm seeing (I've added some additional logging) is the following:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>2013/09/02 06:32:23,205 INFO [org.jboss.aerogear.simplepush.server.netty.NotificationHandler] (nioEventLoopGroup-4-2) /update/NH6A7LiVX6PWj2F42FjnKKmOLYYhHwFt_kxdYyEFY0IuE0uapSQOW2a7aM5WqzWgUK-1mqU5gT6EKxcXQo5wGg
2013/09/02 06:32:23,207 INFO [org.jboss.aerogear.simplepush.util.CryptoUtil] (nioEventLoopGroup-4-2) Try to decrypt: [NH6A7LiVX6PWj2F42FjnKKmOLYYhHwFt_kxdYyEFY0IuE0uapSQOW2a7aM5WqzWgUK-1mqU5gT6EKxcXQo5wGg]
2013/09/02 06:32:23,209 INFO [org.jboss.aerogear.simplepush.util.CryptoUtil] (nioEventLoopGroup-4-2) Decrypting : [NH6A7LiVX6PWj2F42FjnKKmOLYYhHwFt_kxdYyEFY0IuE0uapSQOW2a7aM5WqzWgUK-1mqU5gT6EKxcXQo5wGg] with key [3ZILBAh8vNMU]
2013/09/02 06:32:23,214 ERROR [org.jboss.aerogear.simplepush.server.netty.NotificationHandler] (nioEventLoopGroup-4-2) Error while processing notifiation:: java.security.ProviderException: doFinal() failed
at sun.security.pkcs11.P11Cipher.implDoFinal(P11Cipher.java:814)
at sun.security.pkcs11.P11Cipher.engineDoFinal(P11Cipher.java:542)
at sun.security.pkcs11.P11Cipher.engineDoFinal(P11Cipher.java:525)
at javax.crypto.Cipher.doFinal(Cipher.java:1922) [jce.jar:1.7.0_25]
at org.jboss.aerogear.simplepush.util.CryptoUtil.decrypt(CryptoUtil.java:114) [aerogear-simplepush-server-core-0.8.0.jar:0.8.0]
at org.jboss.aerogear.simplepush.util.CryptoUtil.decryptEndpoint(CryptoUtil.java:136) [aerogear-simplepush-server-core-0.8.0.jar:0.8.0]
at org.jboss.aerogear.simplepush.server.netty.NotificationHandler$Notifier.call(NotificationHandler.java:124) [aerogear-simplepush-server-netty-0.8.0.jar:0.8.0]
at org.jboss.aerogear.simplepush.server.netty.NotificationHandler$Notifier.call(NotificationHandler.java:110) [aerogear-simplepush-server-netty-0.8.0.jar:0.8.0]
at io.netty.util.concurrent.PromiseTask.run(PromiseTask.java:73) [netty-all-4.0.5.Final-SNAPSHOT.jar:]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:354) [netty-all-4.0.5.Final-SNAPSHOT.jar:]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:366) [netty-all-4.0.5.Final-SNAPSHOT.jar:]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:101) [netty-all-4.0.5.Final-SNAPSHOT.jar:]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ENCRYPTED_DATA_INVALID
at sun.security.pkcs11.wrapper.PKCS11.C_DecryptFinal(Native Method)
at sun.security.pkcs11.P11Cipher.implDoFinal(P11Cipher.java:806)
... 12 more
</pre>
</div></div>
<p style='margin-top:0;margin-bottom:10px;'>Steps to reproduce:<br/>
1. Create an OpenShift application to work against:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>rhc create-app kris "https://cartreflect-claytondev.rhcloud.com/reflect?github=danbev/openshift-origin-cartridge-aerogear-push&commit=a448d69036150f720555a1b8929e231fb7719816" mysql-5.1
</pre>
</div></div>
<p style='margin-top:0;margin-bottom:10px;'>2. Update the <a href="https://github.com/aerogear/aerogear-simplepush-server/tree/master/server-netty#access-the-demo-html-page" class="external-link">example</a> and change the server url to point to the application created in step one. <br/>
3. Again follow the steps <a href="https://github.com/aerogear/aerogear-simplepush-server/tree/master/server-netty#access-the-demo-html-page" class="external-link">example</a> to register a channel and then send to that channel.</p>
</td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Fix Versions:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
0.9.0 </td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Project:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<a style="color:#326ca6;" href="https://issues.jboss.org/browse/AGPUSH">AeroGear Push</a>
</td>
</tr> <tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Priority:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<img src="https://issues.jboss.org/images/icons/priorities/critical.png" height="16" width="16" border="0" align="absmiddle" alt="Critical"> Critical
</td>
</tr>
<tr valign="top">
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 10px 10px 0;white-space:nowrap;">
<strong style="font-weight:normal;color:#505050;">Reporter:</strong>
</td>
<td style="color:#000000;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:12px;padding:0 0 10px 0;width:100%;">
<a class="user-hover" rel="beve" id="email_beve" href="https://issues.jboss.org/secure/ViewProfile.jspa?name=beve" style="color:#326ca6;">Daniel Bevenius</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td><!-- End #email-page -->
</tr>
<tr valign="top">
<td style="color:#505050;font-family:Arial,FreeSans,Helvetica,sans-serif;font-size:10px;line-height:14px;padding: 0 16px 16px 16px;text-align:center;">
This message is automatically generated by JIRA.<br />
If you think it was sent incorrectly, please contact your JIRA administrators<br />
For more information on JIRA, see: <a style='color:#326ca6;' href='http://www.atlassian.com/software/jira'>http://www.atlassian.com/software/jira</a>
</td>
</tr>
</table><!-- End #email-wrap -->
</div><!-- End #email-body -->