#include <num.h>
#include "errors.h"
#include <extras/randomart.h>
+#include <pkcs7_int.h>
#include <gnutls-idna.h>
#define addf _gnutls_buffer_append_printf
int count, ret, i;
gnutls_pkcs7_signature_info_st info;
gnutls_buffer_st str;
+ const char *oid;
_gnutls_buffer_init(&str);
+ /* For backwards compatibility with structures using the default OID,
+ * we don't print the eContent Type explicitly */
+ oid = gnutls_pkcs7_get_embedded_data_oid(pkcs7);
+ if (oid) {
+ if (strcmp(oid, DATA_OID) != 0
+ && strcmp(oid, DIGESTED_DATA_OID) != 0) {
+ addf(&str, "eContent Type: %s\n", oid);
+ }
+ }
+
for (i = 0;; i++) {
if (i == 0)
addf(&str, "Signers:\n");
#include "errors.h"
#include <common.h>
#include <x509_b64.h>
+#include <pkcs7_int.h>
#include <gnutls/abstract.h>
#include <gnutls/pkcs7.h>
-#define SIGNED_DATA_OID "1.2.840.113549.1.7.2"
-#define PLAIN_DATA_OID "1.2.840.113549.1.7.1"
-#define DIGESTED_DATA_OID "1.2.840.113549.1.7.5"
-
#define ATTR_MESSAGE_DIGEST "1.2.840.113549.1.9.4"
#define ATTR_SIGNING_TIME "1.2.840.113549.1.9.5"
#define ATTR_CONTENT_TYPE "1.2.840.113549.1.9.3"
goto cleanup;
}
- if (strcmp(pkcs7->encap_data_oid, PLAIN_DATA_OID) != 0
+ if (strcmp(pkcs7->encap_data_oid, DATA_OID) != 0
&& strcmp(pkcs7->encap_data_oid, DIGESTED_DATA_OID) != 0) {
_gnutls_debug_log
("Unknown PKCS#7 Encapsulated Content OID '%s'; treating as raw data\n",
result =
asn1_write_value(pkcs7->signed_data,
- "encapContentInfo.eContentType", PLAIN_DATA_OID,
+ "encapContentInfo.eContentType", DATA_OID,
0);
if (result != ASN1_SUCCESS) {
ret = _gnutls_asn2err(result);
#define DATA_OID "1.2.840.113549.1.7.1"
#define ENC_DATA_OID "1.2.840.113549.1.7.6"
+#define SIGNED_DATA_OID "1.2.840.113549.1.7.2"
+#define DIGESTED_DATA_OID "1.2.840.113549.1.7.5"
+
typedef enum schema_id {
PBES2_GENERIC=1, /* when the algorithm is unknown, temporal use when reading only */