首页 > 解决方案 > 在 WSSecurityCert() 方法肥皂节点 js 中设置摘要算法

问题描述

我想在 WSNSecurityCert() 方法中为签名肥皂请求设置摘要算法,但未添加。如何将摘要算法添加到此方法中?

    const security = new soap.WSSecurityCert(key, cert, '', {
        hasTimeStamp: false,
        signatureAlgorithm: 'http://www.w3.org/2001/04/xmldsig-more#rsa-sha256',
        signatureTransformations: ['http://www.w3.org/2000/09/xmldsig#enveloped-signature'],
        
        signerOptions: {
            prefix: 'ds',
            attrs: {
                Id: 'SIG-B3AD48871E5A24444716260028630905',
                'xmlns:ds': 'http://www.w3.org/2000/09/xmldsig#',
                DigestMethodAlgorithm: "http://www.w3.org/2000/09/xmldsig#sha1"
            },
            existingPrefixes: {
                wsse: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd',
                wsu: 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'
            }
        },
    });

标签: node.jsxmlsoapsoapui

解决方案


推荐阅读