Subversion Repositories oidplus

Rev

Rev 1101 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1101 Rev 1460
Line 148... Line 148...
148
            // altho PHP's OpenSSL bindings only supported EC key creation in PHP 7.1 they've long
148
            // altho PHP's OpenSSL bindings only supported EC key creation in PHP 7.1 they've long
149
            // supported signing / verification
149
            // supported signing / verification
150
            // we use specified curves to avoid issues with OpenSSL possibly not supporting a given named curve;
150
            // we use specified curves to avoid issues with OpenSSL possibly not supporting a given named curve;
151
            // doing this may mean some curve-specific optimizations can't be used but idk if OpenSSL even
151
            // doing this may mean some curve-specific optimizations can't be used but idk if OpenSSL even
152
            // has curve-specific optimizations
152
            // has curve-specific optimizations
153
            $result = openssl_sign($message, $signature, $this->toString('PKCS8', ['namedCurve' => false]), $this->hash->getHash());
153
            $result = openssl_sign($message, $signature, $this->withPassword()->toString('PKCS8', ['namedCurve' => false]), $this->hash->getHash());
154
 
154
 
155
            if ($result) {
155
            if ($result) {
156
                if ($shortFormat == 'ASN1') {
156
                if ($shortFormat == 'ASN1') {
157
                    return $signature;
157
                    return $signature;
158
                }
158
                }