Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]IMAP odbieranie podpisanych cyfrowo emaili
marcinja2
post
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 1.06.2020

Ostrzeżenie: (0%)
-----


Witajcie jestem tu nowy więc proszę o wyrozumiałość jeśli coś zrobię bądź wytłumaczę źle. Aktualnie piszę część programu odpowiadającą za pobieranie poczty email (IMAP) sortowanie, filtrowanie i zapisywanie treści email w bazie MYSQL. Wszystko mi się piknie łączy z serwerem IMAP i pobiera wszystkie wiadomości jednak odczytanie niektórych jest dla mnie problematyczne. Chodzi o wiadomości podpisane cyfrowo. Pobierają się one jako jeden załącznik z rozszeżeniem "p7s" np faktura z popularnego operatora komórkowego. Nijak nie mogę tego otworzyć. Może ktoś z Was streści mi pokrótce logikę prawidłowego podejścia do sprawy lub może ma ktoś gotową funkcję do dekodowania takich plików? Próbowałem zaadoptować jakieś gotowe rozwiązania z Github jednak bezskutecznie, nie rozumiem tego mechanizmu do końca i być może dlatego próby jakiejś adaptacji spełzły na niczym. Proszę o pomoc i z góry dziękuję.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
marcinja2
post
Post #2





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 1.06.2020

Ostrzeżenie: (0%)
-----


wygląda to mniej wiecej tak:
  1. object(stdClass) (11) {
  2. ["type"]=> int(1)
  3. ["encoding"]=> int(0)
  4. ["ifsubtype"]=> int(1)
  5. ["subtype"]=> string(6) "SIGNED"
  6. ["ifdescription"]=> int(0)
  7. ["ifid"]=> int(0)
  8. ["ifdisposition"]=> int(0)
  9. ["ifdparameters"]=> int(0)
  10. ["ifparameters"]=> int(1)
  11. ["parameters"]=> array(4) {
  12. [0]=> object(stdClass) (2) {
  13. ["attribute"]=> string(7) "charset"
  14. ["value"]=> string(5) "utf-8" }
  15. [1]=> object(stdClass) (2) {
  16. ["attribute"]=> string(8) "protocol"
  17. ["value"]=> string(27) "application/pkcs7-signature" }
  18. [2]=> object(stdClass) (2) {
  19. ["attribute"]=> string(6) "micalg"
  20. ["value"]=> string(7) "sha-256" }
  21. [3]=> object(stdClass) (2) {
  22. ["attribute"]=> string(8) "boundary"
  23. ["value"]=> string(31) "assecods7unizeto1smime2boundary" } }
  24. ["parts"]=> array(2) {
  25. [0]=> object(stdClass) (11) {
  26. ["type"]=> int(1)
  27. ["encoding"]=> int(0)
  28. ["ifsubtype"]=> int(1)
  29. ["subtype"]=> string(5) "MIXED"
  30. ["ifdescription"]=> int(0)
  31. ["ifid"]=> int(0)
  32. ["ifdisposition"]=> int(0)
  33. ["ifdparameters"]=> int(0)
  34. ["ifparameters"]=> int(1)
  35. ["parameters"]=> array(1) {
  36. [0]=> object(stdClass) (2) {
  37. ["attribute"]=> string(8) "boundary"
  38. ["value"]=> string(25) "unizetoboundarymainentity" } }
  39. ["parts"]=> array(2) {
  40. [0]=> object(stdClass) (11) {
  41. ["type"]=> int(1)
  42. ["encoding"]=> int(0)
  43. ["ifsubtype"]=> int(1)
  44. ["subtype"]=> string(7) "RELATED"
  45. ["ifdescription"]=> int(0)
  46. ["ifid"]=> int(0)
  47. ["ifdisposition"]=> int(0)
  48. ["ifdparameters"]=> int(0)
  49. ["ifparameters"]=> int(1)
  50. ["parameters"]=> array(1) {
  51. [0]=> object(stdClass) (2) {
  52. ["attribute"]=> string(8) "boundary"
  53. ["value"]=> string(22) "unizetoboundaryrelated" } }
  54. ["parts"]=> array(10) {
  55. [0]=> object(stdClass) (12) {
  56. ["type"]=> int(0)
  57. ["encoding"]=> int(3)
  58. ["ifsubtype"]=> int(1)
  59. ["subtype"]=> string(4) "HTML"
  60. ["ifdescription"]=> int(0)
  61. ["ifid"]=> int(0)
  62. ["lines"]=> int(375)
  63. ["bytes"]=> int(29270)
  64. ["ifdisposition"]=> int(0)
  65. ["ifdparameters"]=> int(0)
  66. ["ifparameters"]=> int(1)
  67. ["parameters"]=> array(1) {
  68. [0]=> object(stdClass) (2) {
  69. ["attribute"]=> string(7) "charset"
  70. ["value"]=> string(5) "utf-8" } } }
  71. [1]=> object(stdClass) (14) {
  72. ["type"]=> int(5) ["encoding"]=> int(3)
  73. ["ifsubtype"]=> int(1)
  74. ["subtype"]=> string(3) "PNG"
  75. ["ifdescription"]=> int(0)
  76. ["ifid"]=> int(1)
  77. ["id"]=> string(12) ""
  78. ["bytes"]=> int(1202)
  79. ["ifdisposition"]=> int(1)
  80. ["disposition"]=> string(6) "inline"
  81. ["ifdparameters"]=> int(1)
  82. ["dparameters"]=> array(1) {
  83. [0]=> object(stdClass) (2) {
  84. ["attribute"]=> string(8) "filename"
  85. ["value"]=> string(10) "Play24.png" } }
  86. ["ifparameters"]=> int(1)
  87. ["parameters"]=> array(1) {
  88. [0]=> object(stdClass) (2) {
  89. ["attribute"]=> string(4) "name"
  90. ["value"]=> string(10) "Play24.png" } } }
  91. [2]=> object(stdClass)(14) {
  92. ["type"]=> int(5)
  93. ["encoding"]=> int(3)
  94. ["ifsubtype"]=> int(1)
  95. ["subtype"]=> string(4) "JPEG"
  96. ["ifdescription"]=> int(0)
  97. ["ifid"]=> int(1)
  98. ["id"]=> string(16) ""
  99. ["bytes"]=> int(9970)
  100. ["ifdisposition"]=> int(1)
  101. ["disposition"]=> string(6) "inline"
  102. ["ifdparameters"]=> int(1)
  103. ["dparameters"]=> array(1) {
  104. [0]=> object(stdClass) (2) {
  105. ["attribute"]=> string(8) "filename"
  106. ["value"]=> string(14) "Arch032016.jpg" } }
  107. ["ifparameters"]=> int(1) ["parameters"]=> array(1) { [0]=> object(stdClass)...itd
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 4.10.2025 - 21:13