public class org.bouncycastle.x509.examples.AttrCertExample
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.bouncycastle.x509.examples.AttrCertExample
super_class: java.lang.Object
{
static org.bouncycastle.x509.X509V1CertificateGenerator v1CertGen;
descriptor: Lorg/bouncycastle/x509/X509V1CertificateGenerator;
flags: (0x0008) ACC_STATIC
static org.bouncycastle.x509.X509V3CertificateGenerator v3CertGen;
descriptor: Lorg/bouncycastle/x509/X509V3CertificateGenerator;
flags: (0x0008) ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.bouncycastle.x509.X509V1CertificateGenerator
dup
invokespecial org.bouncycastle.x509.X509V1CertificateGenerator.<init>:()V
putstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
1: new org.bouncycastle.x509.X509V3CertificateGenerator
dup
invokespecial org.bouncycastle.x509.X509V3CertificateGenerator.<init>:()V
putstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/bouncycastle/x509/examples/AttrCertExample;
public static java.security.cert.X509Certificate createAcIssuerCert(java.security.PublicKey, java.security.PrivateKey);
descriptor: (Ljava/security/PublicKey;Ljava/security/PrivateKey;)Ljava/security/cert/X509Certificate;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=5, args_size=2
start local 0 start local 1 0: ldc "C=AU, O=The Legion of the Bouncy Castle, OU=Bouncy Primary Certificate"
astore 2
start local 2 1: ldc "C=AU, O=The Legion of the Bouncy Castle, OU=Bouncy Primary Certificate"
astore 3
start local 3 2: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
ldc 10
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.setSerialNumber:(Ljava/math/BigInteger;)V
3: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
new org.bouncycastle.jce.X509Principal
dup
aload 2
invokespecial org.bouncycastle.jce.X509Principal.<init>:(Ljava/lang/String;)V
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.setIssuerDN:(Lorg/bouncycastle/asn1/x509/X509Name;)V
4: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
new java.util.Date
dup
invokestatic java.lang.System.currentTimeMillis:()J
ldc 2592000000
lsub
invokespecial java.util.Date.<init>:(J)V
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.setNotBefore:(Ljava/util/Date;)V
5: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
new java.util.Date
dup
invokestatic java.lang.System.currentTimeMillis:()J
ldc 2592000000
ladd
invokespecial java.util.Date.<init>:(J)V
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.setNotAfter:(Ljava/util/Date;)V
6: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
new org.bouncycastle.jce.X509Principal
dup
aload 3
invokespecial org.bouncycastle.jce.X509Principal.<init>:(Ljava/lang/String;)V
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.setSubjectDN:(Lorg/bouncycastle/asn1/x509/X509Name;)V
7: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
aload 0
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.setPublicKey:(Ljava/security/PublicKey;)V
8: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
ldc "SHA1WithRSAEncryption"
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.setSignatureAlgorithm:(Ljava/lang/String;)V
9: getstatic org.bouncycastle.x509.examples.AttrCertExample.v1CertGen:Lorg/bouncycastle/x509/X509V1CertificateGenerator;
aload 1
invokevirtual org.bouncycastle.x509.X509V1CertificateGenerator.generate:(Ljava/security/PrivateKey;)Ljava/security/cert/X509Certificate;
astore 4
start local 4 10: aload 4
new java.util.Date
dup
invokespecial java.util.Date.<init>:()V
invokevirtual java.security.cert.X509Certificate.checkValidity:(Ljava/util/Date;)V
11: aload 4
aload 0
invokevirtual java.security.cert.X509Certificate.verify:(Ljava/security/PublicKey;)V
12: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 pubKey Ljava/security/PublicKey;
0 13 1 privKey Ljava/security/PrivateKey;
1 13 2 issuer Ljava/lang/String;
2 13 3 subject Ljava/lang/String;
10 13 4 cert Ljava/security/cert/X509Certificate;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
pubKey
privKey
public static java.security.cert.X509Certificate createClientCert(java.security.PublicKey, java.security.PrivateKey, java.security.PublicKey);
descriptor: (Ljava/security/PublicKey;Ljava/security/PrivateKey;Ljava/security/PublicKey;)Ljava/security/cert/X509Certificate;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=7, locals=7, args_size=3
start local 0 start local 1 start local 2 0: ldc "C=AU, O=The Legion of the Bouncy Castle, OU=Bouncy Primary Certificate"
astore 3
start local 3 1: new java.util.Hashtable
dup
invokespecial java.util.Hashtable.<init>:()V
astore 4
start local 4 2: new java.util.Vector
dup
invokespecial java.util.Vector.<init>:()V
astore 5
start local 5 3: aload 4
getstatic org.bouncycastle.jce.X509Principal.C:Lorg/bouncycastle/asn1/DERObjectIdentifier;
ldc "AU"
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: aload 4
getstatic org.bouncycastle.jce.X509Principal.O:Lorg/bouncycastle/asn1/DERObjectIdentifier;
ldc "The Legion of the Bouncy Castle"
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
5: aload 4
getstatic org.bouncycastle.jce.X509Principal.L:Lorg/bouncycastle/asn1/DERObjectIdentifier;
ldc "Melbourne"
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
6: aload 4
getstatic org.bouncycastle.jce.X509Principal.CN:Lorg/bouncycastle/asn1/DERObjectIdentifier;
ldc "Eric H. Echidna"
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
7: aload 4
getstatic org.bouncycastle.jce.X509Principal.EmailAddress:Lorg/bouncycastle/asn1/DERObjectIdentifier;
ldc "feedback-crypto@bouncycastle.org"
invokevirtual java.util.Hashtable.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
8: aload 5
getstatic org.bouncycastle.jce.X509Principal.C:Lorg/bouncycastle/asn1/DERObjectIdentifier;
invokevirtual java.util.Vector.addElement:(Ljava/lang/Object;)V
9: aload 5
getstatic org.bouncycastle.jce.X509Principal.O:Lorg/bouncycastle/asn1/DERObjectIdentifier;
invokevirtual java.util.Vector.addElement:(Ljava/lang/Object;)V
10: aload 5
getstatic org.bouncycastle.jce.X509Principal.L:Lorg/bouncycastle/asn1/DERObjectIdentifier;
invokevirtual java.util.Vector.addElement:(Ljava/lang/Object;)V
11: aload 5
getstatic org.bouncycastle.jce.X509Principal.CN:Lorg/bouncycastle/asn1/DERObjectIdentifier;
invokevirtual java.util.Vector.addElement:(Ljava/lang/Object;)V
12: aload 5
getstatic org.bouncycastle.jce.X509Principal.EmailAddress:Lorg/bouncycastle/asn1/DERObjectIdentifier;
invokevirtual java.util.Vector.addElement:(Ljava/lang/Object;)V
13: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.reset:()V
14: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
ldc 20
invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.setSerialNumber:(Ljava/math/BigInteger;)V
15: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
new org.bouncycastle.jce.X509Principal
dup
aload 3
invokespecial org.bouncycastle.jce.X509Principal.<init>:(Ljava/lang/String;)V
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.setIssuerDN:(Lorg/bouncycastle/asn1/x509/X509Name;)V
16: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
new java.util.Date
dup
invokestatic java.lang.System.currentTimeMillis:()J
ldc 2592000000
lsub
invokespecial java.util.Date.<init>:(J)V
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.setNotBefore:(Ljava/util/Date;)V
17: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
new java.util.Date
dup
invokestatic java.lang.System.currentTimeMillis:()J
ldc 2592000000
ladd
invokespecial java.util.Date.<init>:(J)V
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.setNotAfter:(Ljava/util/Date;)V
18: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
new org.bouncycastle.jce.X509Principal
dup
aload 5
aload 4
invokespecial org.bouncycastle.jce.X509Principal.<init>:(Ljava/util/Vector;Ljava/util/Hashtable;)V
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.setSubjectDN:(Lorg/bouncycastle/asn1/x509/X509Name;)V
19: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
aload 0
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.setPublicKey:(Ljava/security/PublicKey;)V
20: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
ldc "SHA1WithRSAEncryption"
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.setSignatureAlgorithm:(Ljava/lang/String;)V
21: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
22: getstatic org.bouncycastle.asn1.misc.MiscObjectIdentifiers.netscapeCertType:Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;
23: iconst_0
24: new org.bouncycastle.asn1.misc.NetscapeCertType
dup
bipush 48
invokespecial org.bouncycastle.asn1.misc.NetscapeCertType.<init>:(I)V
25: invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.addExtension:(Lorg/bouncycastle/asn1/DERObjectIdentifier;ZLorg/bouncycastle/asn1/DEREncodable;)V
26: getstatic org.bouncycastle.x509.examples.AttrCertExample.v3CertGen:Lorg/bouncycastle/x509/X509V3CertificateGenerator;
aload 1
invokevirtual org.bouncycastle.x509.X509V3CertificateGenerator.generate:(Ljava/security/PrivateKey;)Ljava/security/cert/X509Certificate;
astore 6
start local 6 27: aload 6
new java.util.Date
dup
invokespecial java.util.Date.<init>:()V
invokevirtual java.security.cert.X509Certificate.checkValidity:(Ljava/util/Date;)V
28: aload 6
aload 2
invokevirtual java.security.cert.X509Certificate.verify:(Ljava/security/PublicKey;)V
29: aload 6
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 30 0 pubKey Ljava/security/PublicKey;
0 30 1 caPrivKey Ljava/security/PrivateKey;
0 30 2 caPubKey Ljava/security/PublicKey;
1 30 3 issuer Ljava/lang/String;
2 30 4 attrs Ljava/util/Hashtable;
3 30 5 order Ljava/util/Vector;
27 30 6 cert Ljava/security/cert/X509Certificate;
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
pubKey
caPrivKey
caPubKey
public static void main(java.lang.String[]);
descriptor: ([Ljava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=13, locals=21, args_size=1
start local 0 0: new org.bouncycastle.jce.provider.BouncyCastleProvider
dup
invokespecial org.bouncycastle.jce.provider.BouncyCastleProvider.<init>:()V
invokestatic java.security.Security.addProvider:(Ljava/security/Provider;)I
pop
1: new java.security.spec.RSAPublicKeySpec
dup
2: new java.math.BigInteger
dup
ldc "b4a7e46170574f16a97082b22be58b6a2a629798419be12872a4bdba626cfae9900f76abfb12139dce5de56564fab2b6543165a040c606887420e33d91ed7ed7"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
3: new java.math.BigInteger
dup
ldc "11"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
4: invokespecial java.security.spec.RSAPublicKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 1
start local 1 5: new java.security.spec.RSAPrivateCrtKeySpec
dup
6: new java.math.BigInteger
dup
ldc "b4a7e46170574f16a97082b22be58b6a2a629798419be12872a4bdba626cfae9900f76abfb12139dce5de56564fab2b6543165a040c606887420e33d91ed7ed7"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
7: new java.math.BigInteger
dup
ldc "11"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
8: new java.math.BigInteger
dup
ldc "9f66f6b05410cd503b2709e88115d55daced94d1a34d4e32bf824d0dde6028ae79c5f07b580f5dce240d7111f7ddb130a7945cd7d957d1920994da389f490c89"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
9: new java.math.BigInteger
dup
ldc "c0a0758cdf14256f78d4708c86becdead1b50ad4ad6c5c703e2168fbf37884cb"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
10: new java.math.BigInteger
dup
ldc "f01734d7960ea60070f1b06f2bb81bfac48ff192ae18451d5e56c734a5aab8a5"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
11: new java.math.BigInteger
dup
ldc "b54bb9edff22051d9ee60f9351a48591b6500a319429c069a3e335a1d6171391"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
12: new java.math.BigInteger
dup
ldc "d3d83daf2a0cecd3367ae6f8ae1aeb82e9ac2f816c6fc483533d8297dd7884cd"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
13: new java.math.BigInteger
dup
ldc "b8f52fc6f38593dabb661d3f50f8897f8106eee68b1bce78a95b132b4e5b5d19"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
14: invokespecial java.security.spec.RSAPrivateCrtKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 2
start local 2 15: new java.security.spec.RSAPublicKeySpec
dup
16: new java.math.BigInteger
dup
ldc "b259d2d6e627a768c94be36164c2d9fc79d97aab9253140e5bf17751197731d6f7540d2509e7b9ffee0a70a6e26d56e92d2edd7f85aba85600b69089f35f6bdbf3c298e05842535d9f064e6b0391cb7d306e0a2d20c4dfb4e7b49a9640bdea26c10ad69c3f05007ce2513cee44cfe01998e62b6c3637d3fc0391079b26ee36d5"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
17: new java.math.BigInteger
dup
ldc "11"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
18: invokespecial java.security.spec.RSAPublicKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 3
start local 3 19: new java.security.spec.RSAPrivateCrtKeySpec
dup
20: new java.math.BigInteger
dup
ldc "b259d2d6e627a768c94be36164c2d9fc79d97aab9253140e5bf17751197731d6f7540d2509e7b9ffee0a70a6e26d56e92d2edd7f85aba85600b69089f35f6bdbf3c298e05842535d9f064e6b0391cb7d306e0a2d20c4dfb4e7b49a9640bdea26c10ad69c3f05007ce2513cee44cfe01998e62b6c3637d3fc0391079b26ee36d5"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
21: new java.math.BigInteger
dup
ldc "11"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
22: new java.math.BigInteger
dup
ldc "92e08f83cc9920746989ca5034dcb384a094fb9c5a6288fcc4304424ab8f56388f72652d8fafc65a4b9020896f2cde297080f2a540e7b7ce5af0b3446e1258d1dd7f245cf54124b4c6e17da21b90a0ebd22605e6f45c9f136d7a13eaac1c0f7487de8bd6d924972408ebb58af71e76fd7b012a8d0e165f3ae2e5077a8648e619"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
23: new java.math.BigInteger
dup
ldc "f75e80839b9b9379f1cf1128f321639757dba514642c206bbbd99f9a4846208b3e93fbbe5e0527cc59b1d4b929d9555853004c7c8b30ee6a213c3d1bb7415d03"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
24: new java.math.BigInteger
dup
ldc "b892d9ebdbfc37e397256dd8a5d3123534d1f03726284743ddc6be3a709edb696fc40c7d902ed804c6eee730eee3d5b20bf6bd8d87a296813c87d3b3cc9d7947"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
25: new java.math.BigInteger
dup
ldc "1d1a2d3ca8e52068b3094d501c9a842fec37f54db16e9a67070a8b3f53cc03d4257ad252a1a640eadd603724d7bf3737914b544ae332eedf4f34436cac25ceb5"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
26: new java.math.BigInteger
dup
ldc "6c929e4e81672fef49d9c825163fec97c4b7ba7acb26c0824638ac22605d7201c94625770984f78a56e6e25904fe7db407099cad9b14588841b94f5ab498dded"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
27: new java.math.BigInteger
dup
ldc "dae7651ee69ad1d081ec5e7188ae126f6004ff39556bde90e0b870962fa7b926d070686d8244fe5a9aa709a95686a104614834b0ada4b10f53197a5cb4c97339"
bipush 16
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;I)V
28: invokespecial java.security.spec.RSAPrivateCrtKeySpec.<init>:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/math/BigInteger;)V
astore 4
start local 4 29: ldc "RSA"
ldc "BC"
invokestatic java.security.KeyFactory.getInstance:(Ljava/lang/String;Ljava/lang/String;)Ljava/security/KeyFactory;
astore 5
start local 5 30: aload 5
aload 4
invokevirtual java.security.KeyFactory.generatePrivate:(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;
astore 6
start local 6 31: aload 5
aload 3
invokevirtual java.security.KeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
astore 7
start local 7 32: aload 5
aload 2
invokevirtual java.security.KeyFactory.generatePrivate:(Ljava/security/spec/KeySpec;)Ljava/security/PrivateKey;
pop
33: aload 5
aload 1
invokevirtual java.security.KeyFactory.generatePublic:(Ljava/security/spec/KeySpec;)Ljava/security/PublicKey;
astore 8
start local 8 34: aload 7
aload 6
invokestatic org.bouncycastle.x509.examples.AttrCertExample.createAcIssuerCert:(Ljava/security/PublicKey;Ljava/security/PrivateKey;)Ljava/security/cert/X509Certificate;
astore 9
start local 9 35: aload 8
aload 6
aload 7
invokestatic org.bouncycastle.x509.examples.AttrCertExample.createClientCert:(Ljava/security/PublicKey;Ljava/security/PrivateKey;Ljava/security/PublicKey;)Ljava/security/cert/X509Certificate;
astore 10
start local 10 36: new org.bouncycastle.x509.X509V2AttributeCertificateGenerator
dup
invokespecial org.bouncycastle.x509.X509V2AttributeCertificateGenerator.<init>:()V
astore 11
start local 11 37: aload 11
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.reset:()V
38: aload 11
new org.bouncycastle.x509.AttributeCertificateHolder
dup
aload 10
invokespecial org.bouncycastle.x509.AttributeCertificateHolder.<init>:(Ljava/security/cert/X509Certificate;)V
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.setHolder:(Lorg/bouncycastle/x509/AttributeCertificateHolder;)V
39: aload 11
new org.bouncycastle.x509.AttributeCertificateIssuer
dup
aload 9
invokevirtual java.security.cert.X509Certificate.getSubjectX500Principal:()Ljavax/security/auth/x500/X500Principal;
invokespecial org.bouncycastle.x509.AttributeCertificateIssuer.<init>:(Ljavax/security/auth/x500/X500Principal;)V
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.setIssuer:(Lorg/bouncycastle/x509/AttributeCertificateIssuer;)V
40: aload 11
new java.math.BigInteger
dup
ldc "1"
invokespecial java.math.BigInteger.<init>:(Ljava/lang/String;)V
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.setSerialNumber:(Ljava/math/BigInteger;)V
41: aload 11
new java.util.Date
dup
invokestatic java.lang.System.currentTimeMillis:()J
ldc 50000
lsub
invokespecial java.util.Date.<init>:(J)V
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.setNotBefore:(Ljava/util/Date;)V
42: aload 11
new java.util.Date
dup
invokestatic java.lang.System.currentTimeMillis:()J
ldc 50000
ladd
invokespecial java.util.Date.<init>:(J)V
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.setNotAfter:(Ljava/util/Date;)V
43: aload 11
ldc "SHA1WithRSAEncryption"
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.setSignatureAlgorithm:(Ljava/lang/String;)V
44: new org.bouncycastle.asn1.x509.GeneralName
dup
iconst_1
ldc "DAU123456789"
invokespecial org.bouncycastle.asn1.x509.GeneralName.<init>:(ILjava/lang/String;)V
astore 12
start local 12 45: new org.bouncycastle.asn1.ASN1EncodableVector
dup
invokespecial org.bouncycastle.asn1.ASN1EncodableVector.<init>:()V
astore 13
start local 13 46: aload 13
aload 12
invokevirtual org.bouncycastle.asn1.ASN1EncodableVector.add:(Lorg/bouncycastle/asn1/DEREncodable;)V
47: new org.bouncycastle.x509.X509Attribute
dup
ldc "2.5.24.72"
48: new org.bouncycastle.asn1.DERSequence
dup
aload 13
invokespecial org.bouncycastle.asn1.DERSequence.<init>:(Lorg/bouncycastle/asn1/ASN1EncodableVector;)V
49: invokespecial org.bouncycastle.x509.X509Attribute.<init>:(Ljava/lang/String;Lorg/bouncycastle/asn1/ASN1Encodable;)V
astore 14
start local 14 50: aload 11
aload 14
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.addAttribute:(Lorg/bouncycastle/x509/X509Attribute;)V
51: aload 11
52: aload 6
ldc "BC"
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificateGenerator.generate:(Ljava/security/PrivateKey;Ljava/lang/String;)Lorg/bouncycastle/x509/X509AttributeCertificate;
53: checkcast org.bouncycastle.x509.X509V2AttributeCertificate
astore 15
start local 15 54: aload 15
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.getHolder:()Lorg/bouncycastle/x509/AttributeCertificateHolder;
astore 16
start local 16 55: aload 16
aload 10
invokevirtual org.bouncycastle.x509.AttributeCertificateHolder.match:(Ljava/security/cert/Certificate;)Z
ifeq 61
56: aload 16
invokevirtual org.bouncycastle.x509.AttributeCertificateHolder.getEntityNames:()[Ljava/security/Principal;
ifnull 58
57: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 16
invokevirtual org.bouncycastle.x509.AttributeCertificateHolder.getEntityNames:()[Ljava/security/Principal;
arraylength
invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " entity names found"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
58: StackMap locals: java.lang.String[] java.security.spec.RSAPublicKeySpec java.security.spec.RSAPrivateCrtKeySpec java.security.spec.RSAPublicKeySpec java.security.spec.RSAPrivateCrtKeySpec java.security.KeyFactory java.security.PrivateKey java.security.PublicKey java.security.PublicKey java.security.cert.X509Certificate java.security.cert.X509Certificate org.bouncycastle.x509.X509V2AttributeCertificateGenerator org.bouncycastle.asn1.x509.GeneralName org.bouncycastle.asn1.ASN1EncodableVector org.bouncycastle.x509.X509Attribute org.bouncycastle.x509.X509V2AttributeCertificate org.bouncycastle.x509.AttributeCertificateHolder
StackMap stack:
aload 16
invokevirtual org.bouncycastle.x509.AttributeCertificateHolder.getIssuer:()[Ljava/security/Principal;
ifnull 60
59: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 16
invokevirtual org.bouncycastle.x509.AttributeCertificateHolder.getIssuer:()[Ljava/security/Principal;
arraylength
invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " issuer names found, serial number "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 16
invokevirtual org.bouncycastle.x509.AttributeCertificateHolder.getSerialNumber:()Ljava/math/BigInteger;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
60: StackMap locals:
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Matches original client x509 cert"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
61: StackMap locals:
StackMap stack:
aload 15
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.getIssuer:()Lorg/bouncycastle/x509/AttributeCertificateIssuer;
astore 17
start local 17 62: aload 17
aload 9
invokevirtual org.bouncycastle.x509.AttributeCertificateIssuer.match:(Ljava/security/cert/Certificate;)Z
ifeq 66
63: aload 17
invokevirtual org.bouncycastle.x509.AttributeCertificateIssuer.getPrincipals:()[Ljava/security/Principal;
ifnull 65
64: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
aload 17
invokevirtual org.bouncycastle.x509.AttributeCertificateIssuer.getPrincipals:()[Ljava/security/Principal;
arraylength
invokestatic java.lang.String.valueOf:(I)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc " entity names found"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
65: StackMap locals: org.bouncycastle.x509.AttributeCertificateIssuer
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "Matches original ca x509 cert"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
66: StackMap locals:
StackMap stack:
getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "valid not before: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 15
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.getNotBefore:()Ljava/util/Date;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
67: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "valid not before: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 15
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.getNotAfter:()Ljava/util/Date;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
68: aload 15
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.checkValidity:()V
69: aload 15
new java.util.Date
dup
invokespecial java.util.Date.<init>:()V
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.checkValidity:(Ljava/util/Date;)V
70: goto 73
71: StackMap locals:
StackMap stack: java.lang.Exception
astore 18
start local 18 72: getstatic java.lang.System.out:Ljava/io/PrintStream;
aload 18
invokevirtual java.io.PrintStream.println:(Ljava/lang/Object;)V
end local 18 73: StackMap locals:
StackMap stack:
aload 15
aload 7
ldc "BC"
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.verify:(Ljava/security/PublicKey;Ljava/lang/String;)V
74: goto 77
75: StackMap locals:
StackMap stack: java.lang.Exception
astore 18
start local 18 76: getstatic java.lang.System.out:Ljava/io/PrintStream;
aload 18
invokevirtual java.io.PrintStream.println:(Ljava/lang/Object;)V
end local 18 77: StackMap locals:
StackMap stack:
aload 15
invokevirtual org.bouncycastle.x509.X509V2AttributeCertificate.getAttributes:()[Lorg/bouncycastle/x509/X509Attribute;
astore 18
start local 18 78: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "cert has "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 18
arraylength
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " attributes:"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
79: iconst_0
istore 19
start local 19 80: goto 86
81: StackMap locals: org.bouncycastle.x509.X509Attribute[] int
StackMap stack:
aload 18
iload 19
aaload
astore 20
start local 20 82: getstatic java.lang.System.out:Ljava/io/PrintStream;
new java.lang.StringBuilder
dup
ldc "OID: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 20
invokevirtual org.bouncycastle.x509.X509Attribute.getOID:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
83: aload 20
invokevirtual org.bouncycastle.x509.X509Attribute.getOID:()Ljava/lang/String;
ldc "2.5.24.72"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 85
84: getstatic java.lang.System.out:Ljava/io/PrintStream;
ldc "rolesyntax read from cert!"
invokevirtual java.io.PrintStream.println:(Ljava/lang/String;)V
end local 20 85: StackMap locals:
StackMap stack:
iinc 19 1
StackMap locals:
StackMap stack:
86: iload 19
aload 18
arraylength
if_icmplt 81
end local 19 87: return
end local 18 end local 17 end local 16 end local 15 end local 14 end local 13 end local 12 end local 11 end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 88 0 args [Ljava/lang/String;
5 88 1 pubKeySpec Ljava/security/spec/RSAPublicKeySpec;
15 88 2 privKeySpec Ljava/security/spec/RSAPrivateCrtKeySpec;
19 88 3 caPubKeySpec Ljava/security/spec/RSAPublicKeySpec;
29 88 4 caPrivKeySpec Ljava/security/spec/RSAPrivateCrtKeySpec;
30 88 5 fact Ljava/security/KeyFactory;
31 88 6 caPrivKey Ljava/security/PrivateKey;
32 88 7 caPubKey Ljava/security/PublicKey;
34 88 8 pubKey Ljava/security/PublicKey;
35 88 9 caCert Ljava/security/cert/X509Certificate;
36 88 10 clientCert Ljava/security/cert/X509Certificate;
37 88 11 acGen Lorg/bouncycastle/x509/X509V2AttributeCertificateGenerator;
45 88 12 roleName Lorg/bouncycastle/asn1/x509/GeneralName;
46 88 13 roleSyntax Lorg/bouncycastle/asn1/ASN1EncodableVector;
50 88 14 attributes Lorg/bouncycastle/x509/X509Attribute;
54 88 15 att Lorg/bouncycastle/x509/X509V2AttributeCertificate;
55 88 16 h Lorg/bouncycastle/x509/AttributeCertificateHolder;
62 88 17 issuer Lorg/bouncycastle/x509/AttributeCertificateIssuer;
72 73 18 e Ljava/lang/Exception;
76 77 18 e Ljava/lang/Exception;
78 88 18 attribs [Lorg/bouncycastle/x509/X509Attribute;
80 87 19 i I
82 85 20 a Lorg/bouncycastle/x509/X509Attribute;
Exception table:
from to target type
68 70 71 Class java.lang.Exception
73 74 75 Class java.lang.Exception
Exceptions:
throws java.lang.Exception
MethodParameters:
Name Flags
args
}
SourceFile: "AttrCertExample.java"