国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

二進(jìn)制打包成功,運(yùn)行時(shí)報(bào)公鑰問題

yulinzhihou

問題描述

這里詳細(xì)描述問題
MAC 上打包成功。使用了phar:openssl

config/plugin/webman/console/app.php
如下:

<?php
return [
    'enable'        => true,

    'build_dir'     => BASE_PATH . DIRECTORY_SEPARATOR . 'build',

    'phar_filename'  => getenv('BUILD_PHAR'),
    // 打包二進(jìn)制名稱
    'bin_filename'   => getenv('BUILD_BIN'),
    //set the signature algorithm for a phar and apply it. The signature algorithm must be one of Phar::MD5, Phar::SHA1, Phar::SHA256, Phar::SHA512, or Phar::OPENSSL.
    'signature_algorithm' => Phar::OPENSSL,
    // 如果啟用了openssl打包,需要提供私鑰地址
    'private_key_file'      => base_path().DIRECTORY_SEPARATOR.getenv('CERT_PATH').DIRECTORY_SEPARATOR.getenv('APP_NAME').'.key', // The file path for certificate or OpenSSL private key file.
    // 忽略打包格式
    'exclude_pattern'      => '#^(?!.*(composer.json|/.github/|/.idea/|/.git/|/.setting/|/runtime/|/vendor-bin/|/build/|/vendor/webman/admin/))(.*)$#',
    // 忽略打包文件
    'exclude_files'         => [
        '.env', 'LICENSE', 'composer.json', 'composer.lock', 'start.php',  getenv('BUILD_PHAR'), getenv('BUILD_BIN'),
    ],

    'custom_ini' => '
memory_limit = 256M,
upload_max_filesize = 20M
user_agent='.getenv('APP_NAME').'
upload_max_filesize=50M
post_max_size=50M
    ',
];

程序代碼

yulinzhihou@yulinzhihou-MBP tlsf_server_file % php webman build:bin
Phar packing...
Files collect complete, begin add file to Phar.
Write requests to the Phar archive, save changes to disk.

Use PHP8.2 ...

Saved tlsf_server_file to /Users/yulinzhihou/websites/www/high_currency/tlsf_server_file/build/tlsf_server_file
Build Success!

yulinzhihou@yulinzhihou-MBP tlsf_server_file % 

報(bào)錯(cuò)信息

[root@orico-cs8 ~]# cat /etc/centos-release
CentOS Stream release 8
[root@orico-cs8 ~]# cat /etc/os-release
NAME="CentOS Stream"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Stream 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_SUPPORT_PRODUCT_VERSION="CentOS Stream"

Centos Stream 8 上運(yùn)行后

[root@orico-cs8 ~]# ll
total 61260
-rw-------. 1 root root     1696 Sep 15 17:06 anaconda-ks.cfg
-rwxr-xr-x. 1 root root 62719188 Sep 21 14:55 tlsf_server_file
-rw-r--r--. 1 root root      812 Sep 21 14:56 tlsf_server_file.pem
[root@orico-cs8 ~]# chmod 777 tlsf_server_file
[root@orico-cs8 ~]# ./tlsf_server_file start

Fatal error: Uncaught PharException: phar "/root/tlsf_server_file" openssl signature could not be verified: openssl public key could not be read in /root/tlsf_server_file:4
Stack trace:
#0 /root/tlsf_server_file(4): Phar::mapPhar('webman')
#1 {main}
  thrown in /root/tlsf_server_file on line 4
[root@orico-cs8 ~]# 
1618 3 2
3個(gè)回答

yulinzhihou

截圖
證書文件是使用"paragonie/easyrsa": "^0.6.0" 生成的。

  • 暫無評論
yulinzhihou

截圖

  • 暫無評論
z

打包后的.phar后綴可以去掉?

  • yulinzhihou 2024-01-31

    可以的。你可以在配置文件 里面進(jìn)行配置。

  • z 2024-02-21

    咋弄的,打包配置文件里不加.phar就報(bào)錯(cuò)了

  • yulinzhihou 2024-02-21

    安裝 webman/console ,在 config/plugin/webman/console/app.php

    
    <?php
    return [
        'enable'        => true,
    
        'build_dir'     => BASE_PATH . DIRECTORY_SEPARATOR . 'build',
    
        'phar_filename'  => getenv('BUILD_PHAR'),
        // 打包二進(jìn)制名稱
        'bin_filename'   => getenv('BUILD_BIN'),
        //set the signature algorithm for a phar and apply it. The signature algorithm must be one of Phar::MD5, Phar::SHA1, Phar::SHA256, Phar::SHA512, or Phar::OPENSSL.
        'signature_algorithm' => Phar::OPENSSL,
        // 如果啟用了openssl打包,需要提供私鑰地址,打包后,需要將公鑰和打包文件 一起上傳到服務(wù)器,并且兩個(gè)文件必須在同一目錄,公鑰后綴需要將 .pem 改為 .pubkey
        'private_key_file'      => base_path().DIRECTORY_SEPARATOR.getenv('CERT_PATH').DIRECTORY_SEPARATOR.getenv('APP_NAME').'.key', // The file path for certificate or OpenSSL private key file.
        // 忽略打包的文件路徑目錄,這里千萬要注意,把不需要的資源不要打包,我之前 把上偉文件 幾個(gè)G的打包,他就會(huì)報(bào)錯(cuò)。
        'exclude_pattern'      => '#^(?!.*(composer.json|/.github/|/.idea/|/.git/|/.setting/|/runtime/|/vendor-bin/|/build/|/vendor/webman/admin/|/public/storage/tar|/app/command|/certs|/databases))(.*)$#',
        // 忽略打包文件
        'exclude_files'         => [
            '.env', 'LICENSE', 'composer.json', 'composer.lock', 'start.php',  getenv('BUILD_PHAR'), getenv('BUILD_BIN'),
        ],
        // 自定義PHP文件
        'custom_ini' => '
    memory_limit = 256M
    upload_max_filesize = 20M
    user_agent='.getenv('APP_NAME').'
    upload_max_filesize=50M
    post_max_size=50M'
    ];
    

    僅供參考

  • kspade 2024-02-22

    OPENSSL 打包的作用是什么?無法解包? 還是什么

  • yulinzhihou 2024-02-22

    目前不清楚,沒有去弄過,只是求一個(gè)心理安慰?可能覺得比較牛逼點(diǎn)吧

  • yulinzhihou 2024-02-22

    明白了,好像是這個(gè)道理。如果不使用這種方式打包,打包出來的東西,基本上是可以通用的。目前還不清楚有什么辦法能把打包完成的程序解包出來。反編譯嗎?

  • kspade 2024-04-02

    運(yùn)行的時(shí)候需要公鑰 ? 解包的時(shí)候是用公鑰解包還是私鑰?如果說運(yùn)行的時(shí)候用公鑰,解包的時(shí)候用私鑰,那就比較安全了啊

  • yulinzhihou 2024-04-09

    求大佬教學(xué)一下怎么解碼

年代過于久遠(yuǎn),無法發(fā)表回答
??