index 605fb8426f1f4b0972aa4beae3f18ba697efc11c..807930531a516f8ccac1552f17974d322dabca5f 100644 (file)
if(!$fp){
$this->certificate();
if(!$fp){
$this->certificate();
- $this->error=_("Can't open specified file, check accessibility and or existence");
+ $this->error= msgPool::cannotReadFile($data);
return(false);
}else{
/* Reading data*/
return(false);
}else{
/* Reading data*/
/* Data can't be empty */
if($data = ""){
$this->certificate();
/* Data can't be empty */
if($data = ""){
$this->certificate();
- $this->error = _("Can't read specified certificate / or empty string given");
+ $this->error = _("Certificate is empty!");
return(false);
}
return(false);
}
/* If cert is loaded correctly and is PEM now, we could read some data out of it */
if(count($this->info()) <=1) {
$this->certificate();
/* If cert is loaded correctly and is PEM now, we could read some data out of it */
if(count($this->info()) <=1) {
$this->certificate();
- $this->error = _("Can't load certificate, possibly unsupported format (use PEM/DER) ");
+ $this->error = _("Cannot load certificate: only PEM and DER are supported!");
/* Reset*/
return(false);
}
/* Reset*/
return(false);
}
function info($ret = true)
{
if($this->type != PEM){
function info($ret = true)
{
if($this->type != PEM){
- $this->error = _("The Format must be PEM, to output certificate informations");
+ $this->error = _("Cannot extract information for non PEM certificates!");
return(false);
} else {
/* return an array with all given information */
return(false);
} else {
/* return an array with all given information */
$fp = fopen($filename,"w+");
if(!$fp){
$fp = fopen($filename,"w+");
if(!$fp){
- $this->error= _("Can't create/open File");
+ $this->error= msgPool::cannotWriteFile($filename);
return(false);
}else{
fwrite($fp,$this->data,strlen($this->data));
}
return(true);
}else{
return(false);
}else{
fwrite($fp,$this->data,strlen($this->data));
}
return(true);
}else{
- $this->error= _("No valid certificate loaded");
+ $this->error= _("No valid certificate loaded!");
return(false);
}
return(false);
return(false);
}
return(false);