Subversion Repositories oidplus

Rev

Rev 1005 | Rev 1052 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1005 Rev 1050
Line 15... Line 15...
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
17
 * limitations under the License.
18
 */
18
 */
19
 
19
 
20
if (!defined('INSIDE_OIDPLUS')) die();
20
namespace ViaThinkSoft\OIDplus;
21
 
21
 
22
class OIDplusOIDIP {
22
class OIDplusOIDIP {
23
 
23
 
24
        protected $XML_SCHEMA_URN;
24
        protected $XML_SCHEMA_URN;
25
        protected $XML_SCHEMA_URL;
25
        protected $XML_SCHEMA_URL;
Line 524... Line 524...
524
 
524
 
525
                        if (OIDplus::getPkiStatus()) {
525
                        if (OIDplus::getPkiStatus()) {
526
                                try {
526
                                try {
527
                                        require_once __DIR__.'/whois/json/security.inc.php';
527
                                        require_once __DIR__.'/whois/json/security.inc.php';
528
                                        $json = oidplus_json_sign($json, OIDplus::getSystemPrivateKey(), OIDplus::getSystemPublicKey());
528
                                        $json = oidplus_json_sign($json, OIDplus::getSystemPrivateKey(), OIDplus::getSystemPublicKey());
529
                                } catch (Exception $e) {
529
                                } catch (\Exception $e) {
530
                                        // die($e->getMessage());
530
                                        // die($e->getMessage());
531
                                }
531
                                }
532
                        }
532
                        }
533
 
533
 
534
                        // Good JSON schema validator here: https://www.jsonschemavalidator.net
534
                        // Good JSON schema validator here: https://www.jsonschemavalidator.net
Line 607... Line 607...
607
                                $xml .= '<!-- Cannot add signature: "PHP-XML" extension not installed -->';
607
                                $xml .= '<!-- Cannot add signature: "PHP-XML" extension not installed -->';
608
                        } else {
608
                        } else {
609
                                try {
609
                                try {
610
                                        require_once __DIR__.'/whois/xml/security.inc.php';
610
                                        require_once __DIR__.'/whois/xml/security.inc.php';
611
                                        $xml = oidplus_xml_sign($xml, OIDplus::getSystemPrivateKey(), OIDplus::getSystemPublicKey());
611
                                        $xml = oidplus_xml_sign($xml, OIDplus::getSystemPrivateKey(), OIDplus::getSystemPublicKey());
612
                                } catch (Exception $e) {
612
                                } catch (\Exception $e) {
613
                                        $xml .= '<!-- Cannot add signature: '.$e.' -->';
613
                                        $xml .= '<!-- Cannot add signature: '.$e.' -->';
614
                                }
614
                                }
615
                        }
615
                        }
616
 
616
 
617
                        $out_type = 'application/xml; charset=UTF-8';
617
                        $out_type = 'application/xml; charset=UTF-8';