Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以帮助我扭转证书的 DN。(我以前从未使用perl过,所以我不知道最佳实践是什么)。
perl
我有以下字符串:
$issuer = "DC=ORG,DC=OpenXPKI,OU=Test CA,CN=CA ONE";
我需要这个:
$issuer = "CN=CA ONE,OU=Test CA,DC=OpenXPKI,DC=ORG";
我会这样做:
$issuer = join ",", reverse split (/,/, $issuer);
用逗号分割你的字符串,颠倒顺序,然后将它们重新连接在一起(用逗号)