@@ -295,10 +295,11 @@ public IRubyObject set_oid(final ThreadContext context, IRubyObject arg) {
295
295
throw context .runtime .newTypeError (arg , context .runtime .getString ());
296
296
}
297
297
298
+ private static final byte [] NULL = ByteList .NULL_ARRAY ;
299
+
298
300
private static final byte [] CA_ = {'C' , 'A' , ':' };
299
301
private static final byte [] TRUE = {'T' , 'R' , 'U' , 'E' };
300
302
private static final byte [] FALSE = {'F' , 'A' , 'L' , 'S' , 'E' };
301
- private static final byte [] _ = {};
302
303
private static final byte [] SEP = {',' , ' ' };
303
304
private static final byte [] Decipher_Only = {'D' , 'e' , 'c' , 'i' , 'p' , 'h' , 'e' , 'r' , ' ' , 'O' , 'n' , 'l' , 'y' };
304
305
private static final byte [] Digital_Signature = {'D' , 'i' , 'g' , 'i' , 't' , 'a' , 'l' , ' ' , 'S' , 'i' , 'g' , 'n' , 'a' , 't' , 'u' , 'r' , 'e' };
@@ -356,7 +357,7 @@ public RubyString value(final ThreadContext context) {
356
357
if ( oid .equals ("2.5.29.15" ) ) { // keyUsage
357
358
final byte [] enc = getRealValueEncoded ();
358
359
byte b3 = 0 ; byte b2 = enc [2 ]; if ( enc .length > 3 ) b3 = enc [3 ];
359
- final ByteList val = new ByteList (64 ); byte [] sep = _ ;
360
+ final ByteList val = new ByteList (64 ); byte [] sep = NULL ;
360
361
if ((b2 & (byte ) 128 ) != 0 ) {
361
362
val .append (sep ); val .append (Decipher_Only ); sep = SEP ;
362
363
}
@@ -388,7 +389,7 @@ public RubyString value(final ThreadContext context) {
388
389
}
389
390
if ( oid .equals ("2.16.840.1.113730.1.1" ) ) { // nsCertType
390
391
final byte b0 = getRealValueEncoded ()[0 ];
391
- final ByteList val = new ByteList (64 ); byte [] sep = _ ;
392
+ final ByteList val = new ByteList (64 ); byte [] sep = NULL ;
392
393
if ((b0 & (byte ) 128 ) != 0 ) {
393
394
val .append (sep ); val .append (SSL_Client ); sep = SEP ;
394
395
}
0 commit comments