values = attr.getAttrValues();
if ( values.size() != 1 ) {
StressTest.this.performanceTest.getLog().error("SenderNonce.AttrValues should be 1: "+values.size());
return false;
}
ASN1OctetString octstr = ASN1OctetString.getInstance(values.getObjectAt(0));
// SenderNonce is something the server came up with, but it should be 16 chars
if ( octstr.getOctets().length != 16 ) {
StressTest.this.performanceTest.getLog().error("SenderNonce should be 16 bytes: "+octstr.getOctets().length);
return false;
}
// --Recipient Nonce
attr = tab.get(new DERObjectIdentifier(ScepRequestMessage.id_recipientNonce));
if ( attr == null ) {
StressTest.this.performanceTest.getLog().error("RecipientNonce should not be null");
return false;
}
values = attr.getAttrValues();
if ( values.size() != 1 ) {
StressTest.this.performanceTest.getLog().error("RecipientNonce.AttrValues should be 1: "+values.size());
return false;
}
octstr = ASN1OctetString.getInstance(values.getObjectAt(0));
// recipient nonce should be the same as we sent away as sender nonce
String nonce = new String(Base64.encode(octstr.getOctets()));
if ( !StringUtils.equals(senderNonce, nonce) ) {
StressTest.this.performanceTest.getLog().error("RecipientNonce should be "+senderNonce+" but was: "+nonce);
return false;
}
// --Transaction ID