Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ELY-125] Add a DER encoder and decoder #84

Merged
merged 1 commit into from
Dec 8, 2014

Conversation

fjuma
Copy link
Contributor

@fjuma fjuma commented Dec 1, 2014

@wildfly-ci
Copy link

Linux Build 188 is now running using a merge of fd3fd15

@wildfly-ci
Copy link

Windows Build 193 is now running using a merge of fd3fd15

@wildfly-ci
Copy link

Windows Build 193 outcome was SUCCESS using a merge of fd3fd15
Summary: Tests passed: 340, ignored: 17 Build time: 0:01:16

@wildfly-ci
Copy link

Linux Build 188 outcome was SUCCESS using a merge of fd3fd15
Summary: Tests passed: 340, ignored: 17 Build time: 0:07:16

*
* @author <a href="mailto:fjuma@redhat.com">Farah Juma</a>
*/
public class PosByteArrayInputStream extends ByteArrayInputStream {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use ByteIterator instead (see #81) once that's all merged and sorted out. Then you can also get rid of all the IOException which might make things simpler.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, I'll do that.

@wildfly-ci
Copy link

Windows Build 197 is now running using a merge of fd3fd15

@wildfly-ci
Copy link

Linux Build 192 is now running using a merge of fd3fd15

@wildfly-ci
Copy link

Windows Build 197 outcome was SUCCESS using a merge of fd3fd15
Summary: Tests passed: 361, ignored: 31 Build time: 0:01:14

@wildfly-ci
Copy link

Linux Build 192 outcome was SUCCESS using a merge of fd3fd15
Summary: Tests passed: 361, ignored: 31 Build time: 0:07:14

@sguilhen
Copy link
Contributor

sguilhen commented Dec 4, 2014

This looks good but it needs rebasing now that #81 has been merged

@fjuma
Copy link
Contributor Author

fjuma commented Dec 4, 2014

Rebased and updated DERDecoder so that it uses ByteIterator instead of ByteArrayInputStream.

public class DERDecoder implements ASN1Decoder {

private ByteIterator bi;
private LinkedList<DecoderState> states = new LinkedList<DecoderState>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably be an ArrayDeque instead, which also implements the stack contract but is much more memory performant.

@dmlloyd
Copy link
Contributor

dmlloyd commented Dec 8, 2014

Looks great other than (very) minor notes.

@pskopek
Copy link
Contributor

pskopek commented Dec 8, 2014

Reviewed, looks good.

@fjuma
Copy link
Contributor Author

fjuma commented Dec 8, 2014

Updated to use an ArrayDeque for the states in DEREncoder and DERDecoder.

@dmlloyd dmlloyd added the +1 DML label Dec 8, 2014
dmlloyd added a commit that referenced this pull request Dec 8, 2014
[ELY-125] Add a DER encoder and decoder
@dmlloyd dmlloyd merged commit 1fbeb8b into wildfly-security:master Dec 8, 2014
darranl pushed a commit to darranl-archive/2020-wildfly-elytron that referenced this pull request Jan 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants