if (gn == NULL)
return json_null();
- str = GENERAL_NAME_get0_value(gn, &type); // FIXME open call hierarchy FIXME getter review
+ str = GENERAL_NAME_get0_value(gn, &type);
return (type == GEN_URI)
? json_stringn((char const *)str->data, str->length)
: json_string("<Not implemented for now>");
#include "object/signed_object.h"
#include "cache/local_cache.h"
-/* Just to prevent some line breaking. */
-#define GN_URI uniformResourceIdentifier
-
/*
* The X509V3_EXT_METHOD that references NID_sinfo_access uses the AIA item.
* The SIA's d2i function, therefore, returns AIAs.
: false;
}
-static bool
-is_rsync_uri(GENERAL_NAME *name)
-{
- return name->type == GEN_URI && is_rsync(name->d.GN_URI);
-}
-
static int
handle_rpkiManifest(struct rpki_uri *uri, void *arg)
{
DIST_POINT *dp;
GENERAL_NAMES *names;
GENERAL_NAME *name;
+ ASN1_IA5STRING *str;
int i;
- int error = 0;
+ int type;
+ int error;
char const *error_msg;
crldp = X509V3_EXT_d2i(ext);
names = dp->distpoint->name.fullname;
for (i = 0; i < sk_GENERAL_NAME_num(names); i++) {
name = sk_GENERAL_NAME_value(names, i);
- if (is_rsync_uri(name)) {
+ str = GENERAL_NAME_get0_value(name, &type);
+ if (type == GEN_URI && is_rsync(str)) {
/*
* Since we're parsing and validating the manifest's CRL
* at some point, I think that all we need to do now is
* So we will store the URI in @refs, and validate it
* later.
*/
- error = ia5s2string(name->d.GN_URI, &refs->crldp);
+ error = ia5s2string(str, &refs->crldp);
goto end;
}
}