Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.io.IOException: toDerInputStream rejects tag type 77

I am trying to read a pfx certificate using Java from weblogic server but I am getting java.io.IOException: toDerInputStream rejects tag type 77

like image 596
loay abdulaziz Avatar asked Aug 31 '26 06:08

loay abdulaziz


1 Answers

this is for me.
as I download as base64 in string.
and my code need it in byte[],
and my code tells me "java.io.IOException: toDerInputStream rejects tag type 77".
then I do this in powershell,it works.

$fileContentBytes = get-content "the file you read from web"
$a= [System.Convert]::FromBase64String($fileContentBytes)
[IO.File]::WriteAllBytes(‘xxx.pfx’, $a)
like image 145
FarDragon Avatar answered Sep 02 '26 23:09

FarDragon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!