lib/server/server_secure_channel_layer.js
/**
 * @method _check_receiverCertificateThumbprint
 * verify that the receiverCertificateThumbprint send by the client
 * matching the CertificateThumbPrint of the server
 * @param clientSecurityHeader
 * @return {boolean}
 * @private
 */
@method _check_receiverCertificateThumbprint
verify that the receiverCertificateThumbprint send by the client
matching the CertificateThumbPrint of the server
@param clientSecurityHeader
@return {boolean}
@private
@method _check_receiverCertificateThumbprint verify that the receiverCertificateThumbprint send by the client matching the CertificateThumbPrint of the server @param clientSecurityHeader @return { boolean } @private
function _check_receiverCertificateThumbprint(clientSecurityHeader) {
    var self = this;
    if (clientSecurityHeader.receiverCertificateThumbprint) {
        var serverCertificateChain  = self.getCertificateChain();
        var serverCertificate = split_der(serverCertificateChain)[0];
        var myCertificateThumbPrint = crypto_utils.makeSHA1Thumbprint(serverCertificateChain);
        return myCertificateThumbPrint.toString("hex") === clientSecurityHeader.receiverCertificateThumbprint.toString("hex");
    }
    return true;
}
function _check_receiverCertificateThumbprint ( clientSecurityHeader ) { var self = this ; if ( clientSecurityHeader . receiverCertificateThumbprint ) { var serverCertificateChain = self . getCertificateChain ( ) ; var serverCertificate = split_der ( serverCertificateChain ) [ 0 ] ; var myCertificateThumbPrint = crypto_utils . makeSHA1Thumbprint ( serverCertificateChain ) ; return myCertificateThumbPrint . toString ( "hex" ) === clientSecurityHeader . receiverCertificateThumbprint . toString ( "hex" ) ; } return true ; }
@method _check_receiverCertificateThumbprint
 verify that the receiverCertificateThumbprint send by the client
 matching the CertificateThumbPrint of the server
 @param clientSecurityHeader
 @return {boolean}
 @private
@method _check_receiverCertificateThumbprint verify that the receiverCertificateThumbprint send by the client matching the CertificateThumbPrint of the server @param clientSecurityHeader @return { boolean } @private
/* jshint validthis: true */ // check if the receiverCertificateThumbprint is my certificate thumbprint //xx console.log("xxxx     my certificate thumbprint",myCertificateThumbPrint.toString("hex") ); //xx console.log("xxxx receiverCertificateThumbprint",securityHeader.receiverCertificateThumbprint.toString("hex") );