1
1
/*
2
- * Copyright (c) 2015, 2020 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2015, 2021 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -74,15 +74,15 @@ static final class S30CertificateVerifyMessage extends HandshakeMessage {
74
74
75
75
// This happens in client side only.
76
76
ClientHandshakeContext chc = (ClientHandshakeContext )context ;
77
- byte [] temproary = null ;
77
+ byte [] temporary ;
78
78
String algorithm = x509Possession .popPrivateKey .getAlgorithm ();
79
79
try {
80
80
Signature signer =
81
81
getSignature (algorithm , x509Possession .popPrivateKey );
82
82
byte [] hashes = chc .handshakeHash .digest (algorithm ,
83
83
chc .handshakeSession .getMasterSecret ());
84
84
signer .update (hashes );
85
- temproary = signer .sign ();
85
+ temporary = signer .sign ();
86
86
} catch (NoSuchAlgorithmException nsae ) {
87
87
throw chc .conContext .fatal (Alert .INTERNAL_ERROR ,
88
88
"Unsupported signature algorithm (" + algorithm +
@@ -92,7 +92,7 @@ static final class S30CertificateVerifyMessage extends HandshakeMessage {
92
92
"Cannot produce CertificateVerify signature" , gse );
93
93
}
94
94
95
- this .signature = temproary ;
95
+ this .signature = temporary ;
96
96
}
97
97
98
98
S30CertificateVerifyMessage (HandshakeContext context ,
@@ -194,7 +194,7 @@ public String toString() {
194
194
*/
195
195
private static Signature getSignature (String algorithm ,
196
196
Key key ) throws GeneralSecurityException {
197
- Signature signer = null ;
197
+ Signature signer ;
198
198
switch (algorithm ) {
199
199
case "RSA" :
200
200
signer = Signature .getInstance (JsseJce .SIGNATURE_RAWRSA );
@@ -330,14 +330,14 @@ static final class T10CertificateVerifyMessage extends HandshakeMessage {
330
330
331
331
// This happens in client side only.
332
332
ClientHandshakeContext chc = (ClientHandshakeContext )context ;
333
- byte [] temproary = null ;
333
+ byte [] temporary ;
334
334
String algorithm = x509Possession .popPrivateKey .getAlgorithm ();
335
335
try {
336
336
Signature signer =
337
337
getSignature (algorithm , x509Possession .popPrivateKey );
338
338
byte [] hashes = chc .handshakeHash .digest (algorithm );
339
339
signer .update (hashes );
340
- temproary = signer .sign ();
340
+ temporary = signer .sign ();
341
341
} catch (NoSuchAlgorithmException nsae ) {
342
342
throw chc .conContext .fatal (Alert .INTERNAL_ERROR ,
343
343
"Unsupported signature algorithm (" + algorithm +
@@ -347,7 +347,7 @@ static final class T10CertificateVerifyMessage extends HandshakeMessage {
347
347
"Cannot produce CertificateVerify signature" , gse );
348
348
}
349
349
350
- this .signature = temproary ;
350
+ this .signature = temporary ;
351
351
}
352
352
353
353
T10CertificateVerifyMessage (HandshakeContext context ,
@@ -448,7 +448,7 @@ public String toString() {
448
448
*/
449
449
private static Signature getSignature (String algorithm ,
450
450
Key key ) throws GeneralSecurityException {
451
- Signature signer = null ;
451
+ Signature signer ;
452
452
switch (algorithm ) {
453
453
case "RSA" :
454
454
signer = Signature .getInstance (JsseJce .SIGNATURE_RAWRSA );
@@ -605,17 +605,17 @@ static final class T12CertificateVerifyMessage extends HandshakeMessage {
605
605
}
606
606
607
607
this .signatureScheme = schemeAndSigner .getKey ();
608
- byte [] temproary = null ;
608
+ byte [] temporary ;
609
609
try {
610
610
Signature signer = schemeAndSigner .getValue ();
611
611
signer .update (chc .handshakeHash .archived ());
612
- temproary = signer .sign ();
612
+ temporary = signer .sign ();
613
613
} catch (SignatureException ikse ) {
614
614
throw chc .conContext .fatal (Alert .HANDSHAKE_FAILURE ,
615
615
"Cannot produce CertificateVerify signature" , ikse );
616
616
}
617
617
618
- this .signature = temproary ;
618
+ this .signature = temporary ;
619
619
}
620
620
621
621
T12CertificateVerifyMessage (HandshakeContext handshakeContext ,
@@ -930,17 +930,17 @@ static final class T13CertificateVerifyMessage extends HandshakeMessage {
930
930
serverSignHead .length , hashValue .length );
931
931
}
932
932
933
- byte [] temproary = null ;
933
+ byte [] temporary ;
934
934
try {
935
935
Signature signer = schemeAndSigner .getValue ();
936
936
signer .update (contentCovered );
937
- temproary = signer .sign ();
937
+ temporary = signer .sign ();
938
938
} catch (SignatureException ikse ) {
939
939
throw context .conContext .fatal (Alert .HANDSHAKE_FAILURE ,
940
940
"Cannot produce CertificateVerify signature" , ikse );
941
941
}
942
942
943
- this .signature = temproary ;
943
+ this .signature = temporary ;
944
944
}
945
945
946
946
T13CertificateVerifyMessage (HandshakeContext context ,
0 commit comments