Subversion Repositories oidplus

Rev

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

Rev 801 Rev 830
Line 75... Line 75...
75
                                "system_id" => OIDplus::getSystemId(false),
75
                                "system_id" => OIDplus::getSystemId(false),
76
                                "oid" => $oid
76
                                "oid" => $oid
77
                        );
77
                        );
78
 
78
 
79
                        $signature = '';
79
                        $signature = '';
80
                        if (!OIDplus::getPkiStatus() || !@openssl_sign(json_encode($payload), $signature, OIDplus::config()->getValue('oidplus_private_key'))) {
80
                        if (!OIDplus::getPkiStatus() || !@openssl_sign(json_encode($payload), $signature, OIDplus::getSystemPrivateKey())) {
81
                                if (!OIDplus::getPkiStatus()) {
81
                                if (!OIDplus::getPkiStatus()) {
82
                                        throw new OIDplusException(_L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.'));
82
                                        throw new OIDplusException(_L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.'));
83
                                } else {
83
                                } else {
84
                                        throw new OIDplusException(_L('Signature failed'));
84
                                        throw new OIDplusException(_L('Signature failed'));
85
                                }
85
                                }
Line 180... Line 180...
180
                                "system_id" => OIDplus::getSystemId(false),
180
                                "system_id" => OIDplus::getSystemId(false),
181
                                "show_all" => 1 // this is required so that the VTS OIDRA gets no false notifications for adding the systems in the directory 1.3.6.1.4.1.37476.30.9
181
                                "show_all" => 1 // this is required so that the VTS OIDRA gets no false notifications for adding the systems in the directory 1.3.6.1.4.1.37476.30.9
182
                        );
182
                        );
183
 
183
 
184
                        $signature = '';
184
                        $signature = '';
185
                        if (!OIDplus::getPkiStatus() || !@openssl_sign(json_encode($payload), $signature, OIDplus::config()->getValue('oidplus_private_key'))) {
185
                        if (!OIDplus::getPkiStatus() || !@openssl_sign(json_encode($payload), $signature, OIDplus::getSystemPrivateKey())) {
186
                                if (!OIDplus::getPkiStatus()) {
186
                                if (!OIDplus::getPkiStatus()) {
187
                                        throw new OIDplusException(_L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.'));
187
                                        throw new OIDplusException(_L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.'));
188
                                } else {
188
                                } else {
189
                                        throw new OIDplusException(_L('Signature failed'));
189
                                        throw new OIDplusException(_L('Signature failed'));
190
                                }
190
                                }
Line 454... Line 454...
454
                                "system_id" => OIDplus::getSystemId(false),
454
                                "system_id" => OIDplus::getSystemId(false),
455
                                "show_all" => 0
455
                                "show_all" => 0
456
                        );
456
                        );
457
 
457
 
458
                        $signature = '';
458
                        $signature = '';
459
                        if (!OIDplus::getPkiStatus() || !@openssl_sign(json_encode($payload), $signature, OIDplus::config()->getValue('oidplus_private_key'))) {
459
                        if (!OIDplus::getPkiStatus() || !@openssl_sign(json_encode($payload), $signature, OIDplus::getSystemPrivateKey())) {
460
                                if (!OIDplus::getPkiStatus()) {
460
                                if (!OIDplus::getPkiStatus()) {
461
                                        throw new OIDplusException(_L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.'));
461
                                        throw new OIDplusException(_L('Error: Your system could not generate a private/public key pair. (OpenSSL is probably missing on your system). Therefore, you cannot register/unregister your OIDplus instance.'));
462
                                } else {
462
                                } else {
463
                                        throw new OIDplusException(_L('Signature failed'));
463
                                        throw new OIDplusException(_L('Signature failed'));
464
                                }
464
                                }