equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Sun designates this |
7 * published by the Free Software Foundation. Sun designates this |
87 * </pre> |
87 * </pre> |
88 * |
88 * |
89 * @author Hemma Prafullchandra |
89 * @author Hemma Prafullchandra |
90 * @see X509CRL |
90 * @see X509CRL |
91 */ |
91 */ |
92 public class X509CRLImpl extends X509CRL { |
92 public class X509CRLImpl extends X509CRL implements DerEncoder { |
93 |
93 |
94 // CRL data, and its envelope |
94 // CRL data, and its envelope |
95 private byte[] signedCRL = null; // DER encoded crl |
95 private byte[] signedCRL = null; // DER encoded crl |
96 private byte[] signature = null; // raw signature bits |
96 private byte[] signature = null; // raw signature bits |
97 private byte[] tbsCertList = null; // DER encoded "to-be-signed" CRL |
97 private byte[] tbsCertList = null; // DER encoded "to-be-signed" CRL |
1187 } else { |
1187 } else { |
1188 return prevCertIssuer; |
1188 return prevCertIssuer; |
1189 } |
1189 } |
1190 } |
1190 } |
1191 |
1191 |
|
1192 @Override |
|
1193 public void derEncode(OutputStream out) throws IOException { |
|
1194 if (signedCRL == null) |
|
1195 throw new IOException("Null CRL to encode"); |
|
1196 out.write(signedCRL.clone()); |
|
1197 } |
|
1198 |
1192 /** |
1199 /** |
1193 * Immutable X.509 Certificate Issuer DN and serial number pair |
1200 * Immutable X.509 Certificate Issuer DN and serial number pair |
1194 */ |
1201 */ |
1195 private final static class X509IssuerSerial { |
1202 private final static class X509IssuerSerial { |
1196 final X500Principal issuer; |
1203 final X500Principal issuer; |